"Monitor" service via systemd
This commit is contained in:
parent
719fc93598
commit
65a0d4046e
5 changed files with 23 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue