From 6ad1f61d6ad11917837b86f60d8f08ce5b3eb3f6 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 13 Feb 2022 14:32:04 +0100 Subject: pterodactyl_wings --- galaxy.yml | 2 +- roles/pterodactyl_wings/Readme.md | 6 ++++ roles/pterodactyl_wings/defaults/main.yml | 2 ++ roles/pterodactyl_wings/files/wings.service | 19 +++++++++++++ roles/pterodactyl_wings/handlers/main.yml | 7 +++++ roles/pterodactyl_wings/tasks/main.yml | 43 +++++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 roles/pterodactyl_wings/Readme.md create mode 100644 roles/pterodactyl_wings/defaults/main.yml create mode 100644 roles/pterodactyl_wings/files/wings.service create mode 100644 roles/pterodactyl_wings/handlers/main.yml create mode 100644 roles/pterodactyl_wings/tasks/main.yml diff --git a/galaxy.yml b/galaxy.yml index 76d8ac7..f587b0d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: kompetenzbolzen name: stuff -version: 0.9.3 +version: 0.9.4 readme: README.md authors: - Jonas Gunz diff --git a/roles/pterodactyl_wings/Readme.md b/roles/pterodactyl_wings/Readme.md new file mode 100644 index 0000000..0b616cb --- /dev/null +++ b/roles/pterodactyl_wings/Readme.md @@ -0,0 +1,6 @@ +# Pterodactyl-Wings + +No Configuration in playbook. + +Add Node in panel, then copy configuration-file to `/etc/pterodactyl/config.yml`. +Set Path of certs. diff --git a/roles/pterodactyl_wings/defaults/main.yml b/roles/pterodactyl_wings/defaults/main.yml new file mode 100644 index 0000000..30c5dc6 --- /dev/null +++ b/roles/pterodactyl_wings/defaults/main.yml @@ -0,0 +1,2 @@ +wings_version: 'v1.6.1' +wings_checksum: '28a3d0a334559e1d4b0bc36e0ac90e44a20654b64512a898af0ad42472bb1156' diff --git a/roles/pterodactyl_wings/files/wings.service b/roles/pterodactyl_wings/files/wings.service new file mode 100644 index 0000000..d7a244e --- /dev/null +++ b/roles/pterodactyl_wings/files/wings.service @@ -0,0 +1,19 @@ +[Unit] +Description=Pterodactyl Wings Daemon +After=docker.service +Requires=docker.service +PartOf=docker.service + +[Service] +User=root +WorkingDirectory=/etc/pterodactyl +LimitNOFILE=4096 +PIDFile=/var/run/wings/daemon.pid +ExecStart=/usr/local/bin/wings +Restart=on-failure +StartLimitInterval=180 +StartLimitBurst=30 +RestartSec=5s + +[Install] +WantedBy=multi-user.target diff --git a/roles/pterodactyl_wings/handlers/main.yml b/roles/pterodactyl_wings/handlers/main.yml new file mode 100644 index 0000000..04c80e1 --- /dev/null +++ b/roles/pterodactyl_wings/handlers/main.yml @@ -0,0 +1,7 @@ +--- +- name: Handle systemd + systemd: + name: wings + enabled: yes + state: restarted + become: yes diff --git a/roles/pterodactyl_wings/tasks/main.yml b/roles/pterodactyl_wings/tasks/main.yml new file mode 100644 index 0000000..4e7d654 --- /dev/null +++ b/roles/pterodactyl_wings/tasks/main.yml @@ -0,0 +1,43 @@ +--- +- name: Create dirs + file: + state: directory + path: /etc/pterodactyl + become: yes + +- name: Check for changed cert + command: /bin/true + when: '{{ cert_changed | default(False) }}' + notify: + - Handle systemd + +- name: Install packages + apt: + name: docker.io + become: yes + +- name: Enable docker + systemd: + name: docker + enabled: yes + state: started + become: yes + +- name: Download Wings + get_url: + url: 'https://github.com/pterodactyl/wings/releases/download/{{ wings_version }}/wings_linux_amd64' + checksum: 'sha256:{{ wings_checksum }}' + dest: /usr/local/bin/wings + owner: root + group: root + mode: '755' + become: yes + notify: + - Handle systemd + +- name: Install unit file + copy: + src: 'wings.service' + dest: '/etc/systemd/system/wings.service' + become: yes + notify: Handle systemd -- cgit v1.2.3