aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2022-02-13 14:32:04 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2022-02-13 14:32:04 +0100
commit6ad1f61d6ad11917837b86f60d8f08ce5b3eb3f6 (patch)
treebf0f6fe8593535ee8e097a74f8f124401c51c386
parent8e28e73ab7d1f4006b73d7dfa7b52eb4a9ec7e37 (diff)
downloadansible_collection-6ad1f61d6ad11917837b86f60d8f08ce5b3eb3f6.tar.gz
pterodactyl_wings
-rw-r--r--galaxy.yml2
-rw-r--r--roles/pterodactyl_wings/Readme.md6
-rw-r--r--roles/pterodactyl_wings/defaults/main.yml2
-rw-r--r--roles/pterodactyl_wings/files/wings.service19
-rw-r--r--roles/pterodactyl_wings/handlers/main.yml7
-rw-r--r--roles/pterodactyl_wings/tasks/main.yml43
6 files changed, 78 insertions, 1 deletions
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 <himself@jonasgunz.de>
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