"Monitor" service via systemd

This commit is contained in:
phil 2023-11-01 08:23:48 +01:00
parent 719fc93598
commit 65a0d4046e
5 changed files with 23 additions and 21 deletions

View file

@ -46,3 +46,18 @@
mode: "0644"
notify: reload nginx
when: nginx_type == 'gateway' or nginx_type == 'standalone'
- name: "Configuration | Create systemd override directory"
ansible.builtin.file:
path: /etc/systemd/system/nginx.service.d
state: directory
mode: "0755"
- name: "Configuration | Copy systemd override configuration"
ansible.builtin.copy:
src: systemd/override.conf
dest: /etc/systemd/system/nginx.service.d/override.conf
mode: "0644"
notify:
- Reload systemd
- reload nginx

View file

@ -23,11 +23,3 @@
dest: /etc/nginx/sites-enabled/local-statistics
state: link
notify: reload nginx
- name: "Monitoring | Copy Monit configuration"
ansible.builtin.template:
src: monit.j2
dest: /etc/monit/conf-enabled/nginx
mode: 0644
notify: reload monit
when: "'monit' in ansible_facts.packages"