feat(roles/coolify): added traefik watchdog
This commit is contained in:
7 files changed
+131
-1
No files matched your search
@@ -13,6 +13,11 @@
|
||||
ansible.builtin.include_tasks: detect.yaml
|
||||
tags: always
|
||||
|
||||
- name: Disable Coolify proxy watchdog
|
||||
ansible.builtin.include_tasks: watchdog_disable.yaml
|
||||
when: coolify_state in ['absent', 'stopped']
|
||||
tags: coolify, proxy
|
||||
|
||||
- name: Uninstall Coolify
|
||||
ansible.builtin.include_tasks: delete.yaml
|
||||
when: coolify_state == 'absent'
|
||||
@@ -60,6 +65,11 @@
|
||||
- name: Ensure services are running
|
||||
ansible.builtin.include_tasks: start.yaml
|
||||
|
||||
- name: Configure Coolify proxy watchdog
|
||||
ansible.builtin.include_tasks: watchdog.yaml
|
||||
when: coolify_state in ['present', 'latest']
|
||||
tags: coolify, proxy
|
||||
|
||||
- name: Show Coolify status
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Deploy Coolify proxy watchdog script
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: proxy-watchdog.sh.j2
|
||||
dest: /usr/local/sbin/coolify-proxy-watchdog
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0750"
|
||||
|
||||
- name: Deploy Coolify proxy watchdog units
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/systemd/system/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
loop:
|
||||
- coolify-proxy-watchdog.service
|
||||
- coolify-proxy-watchdog.timer
|
||||
|
||||
- name: Enable Coolify proxy watchdog timer
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: coolify-proxy-watchdog.timer
|
||||
daemon_reload: true
|
||||
enabled: true
|
||||
state: started
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: Check for Coolify proxy watchdog timer
|
||||
become: true
|
||||
ansible.builtin.stat:
|
||||
path: /etc/systemd/system/coolify-proxy-watchdog.timer
|
||||
register: _coolify_watchdog_timer
|
||||
|
||||
- name: Disable Coolify proxy watchdog timer
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: coolify-proxy-watchdog.timer
|
||||
enabled: false
|
||||
state: stopped
|
||||
when: _coolify_watchdog_timer.stat.exists
|
||||
|
||||
- name: Remove Coolify proxy watchdog files
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /usr/local/sbin/coolify-proxy-watchdog
|
||||
- /etc/systemd/system/coolify-proxy-watchdog.service
|
||||
- /etc/systemd/system/coolify-proxy-watchdog.timer
|
||||
register: _coolify_watchdog_removed
|
||||
when: coolify_state == 'absent'
|
||||
|
||||
- name: Reload systemd after removing Coolify proxy watchdog
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
when:
|
||||
- coolify_state == 'absent'
|
||||
- _coolify_watchdog_removed is changed
|
||||
Reference in new issue
Block a user