diff --git a/roles/pterodactyl_panel/README.md b/roles/pterodactyl_panel/README.md index 11950f9..930b288 100644 --- a/roles/pterodactyl_panel/README.md +++ b/roles/pterodactyl_panel/README.md @@ -18,11 +18,12 @@ There's a few things this role does *NOT* do, namely: ## Supported Distributions and Panel Versions -This role officially supports the Pterodactyl 1.x series of releases. +This role supports the Pterodactyl 1.x series of releases. We officially support the following distributions and releases: | Distribution | PHP Version | Supported Panel Release | Note | |--------------|-------------|-------------------------|------| +| Ubuntu 24.04 LTS | `8.3` | `latest` | | | Ubuntu 22.04 LTS | `8.1` | `latest` | | | Ubuntu 20.04 LTS | `7.4` | `<=1.10.x` | `1.10` releases are the last to support PHP 7 | | Debian 12 | `8.2` |`latest` | | diff --git a/roles/pterodactyl_panel/molecule/default/molecule.yml b/roles/pterodactyl_panel/molecule/default/molecule.yml index 12508da..d78bfe0 100644 --- a/roles/pterodactyl_panel/molecule/default/molecule.yml +++ b/roles/pterodactyl_panel/molecule/default/molecule.yml @@ -1,5 +1,29 @@ --- platforms: + - name: pterodactyl-panel-ubuntu-24 + image: "docker.io/geerlingguy/docker-ubuntu2404-ansible" + groups: + - panel + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host + privileged: true + override_command: false + pre_build_image: true + networks: + - name: molecule-pterodactyl-panel + - name: pterodactyl-panel-ubuntu-24-db + image: docker.io/mariadb + pre_build_image: true + override_command: false + env: + MYSQL_ROOT_PASSWORD: panel_molecule + MYSQL_DATABASE: panel_molecule + MYSQL_USER: panel_molecule + MYSQL_PASSWORD: qw#F8CcMFU%m64o + networks: + - name: molecule-pterodactyl-panel + - name: pterodactyl-panel-ubuntu-22 image: "docker.io/geerlingguy/docker-ubuntu2204-ansible" groups: diff --git a/roles/pterodactyl_panel/molecule/default/prepare.yml b/roles/pterodactyl_panel/molecule/default/prepare.yml index d04a543..cfcccb5 100644 --- a/roles/pterodactyl_panel/molecule/default/prepare.yml +++ b/roles/pterodactyl_panel/molecule/default/prepare.yml @@ -4,3 +4,12 @@ apt: update_cache: yes when: ansible_os_family == "Debian" + + # the geerlingguy images apparently use systemd-cron instead of the regular cron used on ubuntu by default, + # this causes module failures with the cron module as systemd-cron has different return codes + - name: Ensure systemd-cron is absent + ansible.builtin.apt: + name: + - systemd-cron + state: absent + when: ansible_os_family == "Debian" diff --git a/roles/pterodactyl_panel/tasks/panel_workers.yml b/roles/pterodactyl_panel/tasks/panel_workers.yml index 0b71843..d1957b2 100644 --- a/roles/pterodactyl_panel/tasks/panel_workers.yml +++ b/roles/pterodactyl_panel/tasks/panel_workers.yml @@ -1,12 +1,19 @@ +- name: Look for crontab executable + #"command" is a shell builtin, hence the need for the shell module + shell: "command -v crontab" + register: _crontab_install + # dash (Debian sh shell) uses 127 instead of 1 for not found errors + failed_when: _crontab_install.rc not in [0,1,127] + changed_when: no + check_mode: no + # Schedules used to be run with cron, but we have since switched to systemd timers - make sure the old residue is gone. - name: Old Schedule cronjob is absent cron: name: "Pterodactyl Panel - Schedule" state: absent register: _crontab_removal - # Some systems don't ship with crontab, but that also means that there can't be a job set up with it. - # To prevent having to install crontab just to look for a job that can't exist, we overwrite the error condition - failed_when: _crontab_removal.failed and 'Failed to find required executable' not in _crontab_removal.msg + when: _crontab_install.rc == 0 - name: Schedule systemd service is present template: diff --git a/roles/pterodactyl_wings/README.md b/roles/pterodactyl_wings/README.md index f450bee..8582698 100644 --- a/roles/pterodactyl_wings/README.md +++ b/roles/pterodactyl_wings/README.md @@ -12,8 +12,8 @@ Older versions are supported on a best-effort basis. ## Requirements - The following distributions are currently supported: - - Ubuntu: 20.04 LTS, 22.04 LTS - - Debian: 10, 11, 12 + - Ubuntu: 20.04 LTS, 22.04, 24.04 LTS + - Debian: 11, 12 - This role requires root access. Make sure to run this role with `become: yes` or equivalent - Docker is required to run Wings. If docker is not present, this role will install it automatically - You must have already created a new node in your panel. diff --git a/roles/pterodactyl_wings/molecule/default/molecule.yml b/roles/pterodactyl_wings/molecule/default/molecule.yml index 657046f..1d798ed 100644 --- a/roles/pterodactyl_wings/molecule/default/molecule.yml +++ b/roles/pterodactyl_wings/molecule/default/molecule.yml @@ -1,7 +1,7 @@ --- platforms: - - name: pterodactyl-wings-ubuntu-22 - image: "docker.io/geerlingguy/docker-ubuntu2204-ansible" + - name: pterodactyl-wings-ubuntu-24 + image: "docker.io/geerlingguy/docker-ubuntu2404-ansible" volumes: # The wings daemon needs to connect to a docker daemon. We use a sibling setup # to allow the wings containers to access the host docker daemon by passing through the docker socket @@ -15,8 +15,8 @@ platforms: override_command: false pre_build_image: true - - name: pterodactyl-wings-ubuntu-20 - image: "docker.io/geerlingguy/docker-ubuntu2004-ansible" + - name: pterodactyl-wings-ubuntu-22 + image: "docker.io/geerlingguy/docker-ubuntu2204-ansible" volumes: # The wings daemon needs to connect to a docker daemon. We use a sibling setup # to allow the wings containers to access the host docker daemon by passing through the docker socket @@ -30,20 +30,23 @@ platforms: override_command: false pre_build_image: true - - name: pterodactyl-wings-debian-12 - image: "docker.io/geerlingguy/docker-debian12-ansible" + - name: pterodactyl-wings-ubuntu-20 + image: "docker.io/geerlingguy/docker-ubuntu2004-ansible" volumes: + # The wings daemon needs to connect to a docker daemon. We use a sibling setup + # to allow the wings containers to access the host docker daemon by passing through the docker socket - /var/run/docker.sock:/tmp/docker.sock - /sys/fs/cgroup:/sys/fs/cgroup:rw env: + # The /tmp/sock workaround is required due to this issue: https://github.com/ansible-community/molecule/issues/1568 DOCKER_HOST: /tmp/docker.sock cgroupns_mode: host privileged: true override_command: false pre_build_image: true - - name: pterodactyl-wings-debian-11 - image: "docker.io/geerlingguy/docker-debian11-ansible" + - name: pterodactyl-wings-debian-12 + image: "docker.io/geerlingguy/docker-debian12-ansible" volumes: - /var/run/docker.sock:/tmp/docker.sock - /sys/fs/cgroup:/sys/fs/cgroup:rw @@ -54,8 +57,8 @@ platforms: override_command: false pre_build_image: true - - name: pterodactyl-wings-debian-10 - image: "docker.io/geerlingguy/docker-debian10-ansible" + - name: pterodactyl-wings-debian-11 + image: "docker.io/geerlingguy/docker-debian11-ansible" volumes: - /var/run/docker.sock:/tmp/docker.sock - /sys/fs/cgroup:/sys/fs/cgroup:rw