diff options
Diffstat (limited to 'roles/pterodactyl_wings')
-rw-r--r-- | roles/pterodactyl_wings/Readme.md | 6 | ||||
-rw-r--r-- | roles/pterodactyl_wings/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/pterodactyl_wings/files/wings.service | 19 | ||||
-rw-r--r-- | roles/pterodactyl_wings/handlers/main.yml | 7 | ||||
-rw-r--r-- | roles/pterodactyl_wings/tasks/main.yml | 43 |
5 files changed, 77 insertions, 0 deletions
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 |