summaryrefslogtreecommitdiff
path: root/roles/fcgiwrap/tasks
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-08-26 09:37:14 +0100
committerJoe Carstairs <me@joeac.net>2026-08-26 09:37:33 +0100
commit29c1c4c8afc41303d00cde10950d42129c7c0f33 (patch)
tree43d209abf8a81b81b63a8b77361c26223558e496 /roles/fcgiwrap/tasks
parent7a17fe4dcee235b5973326c6daedebccc2de41d2 (diff)
fcgiwrap is self-updating
Diffstat (limited to 'roles/fcgiwrap/tasks')
-rw-r--r--roles/fcgiwrap/tasks/main.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/roles/fcgiwrap/tasks/main.yml b/roles/fcgiwrap/tasks/main.yml
new file mode 100644
index 0000000..7435274
--- /dev/null
+++ b/roles/fcgiwrap/tasks/main.yml
@@ -0,0 +1,40 @@
+- name: Install fcgiwrap
+ community.general.apk:
+ name: fcgiwrap
+
+- name: Configure fcgiwrap daemon
+ register: fcgiwrap_conf
+ vars:
+ fcgiwrap_socket: /run/fcgiwrap.sock
+ fcgiwrap_user: nginx
+ fcgiwrap_group: nginx
+ ansible.builtin.template:
+ src: conf.d/fcgiwrap
+ dest: /etc/conf.d/fcgiwrap
+ mode: "644"
+
+- name: Restart fcgiwrap daemon and configure to start on boot
+ when: fcgiwrap_conf is changed
+ ansible.builtin.service:
+ name: fcgiwrap
+ enabled: true
+ state: restarted
+
+- name: Start fcgiwrap daemon and configure to start on boot
+ when: not ( fcgiwrap_conf is changed )
+ ansible.builtin.service:
+ name: fcgiwrap
+ enabled: true
+ state: started
+
+- name: Install script to update fcgiwrap
+ ansible.builtin.template:
+ src: update_fcgiwrap
+ dest: /usr/bin/update_fcgiwrap
+ mode: "755"
+
+- name: Install daily crontab to update fcgiwrap
+ ansible.builtin.cron:
+ special_time: daily
+ name: Update fcgiwrap
+ job: /usr/bin/update_fcgiwrap