2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-06-30 18:59:53 +02:00
|
|
|
- name: "(Handler: All OSs) Check NGINX"
|
|
|
|
command: "nginx -t"
|
|
|
|
changed_when: false
|
|
|
|
|
2020-08-19 18:39:17 +02:00
|
|
|
- name: "(Handler: All OSs) Systemd Daemon-Reload"
|
2020-06-30 18:59:53 +02:00
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
2019-05-20 18:32:08 +02:00
|
|
|
- name: "(Handler: All OSs) Run NGINX"
|
|
|
|
block:
|
|
|
|
- name: "(Handler: All OSs) Start NGINX"
|
|
|
|
service:
|
|
|
|
name: nginx
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2020-04-21 20:52:31 +02:00
|
|
|
notify: "(Handler: All OSs) Check NGINX"
|
2018-04-07 01:32:48 +02:00
|
|
|
|
2019-05-20 18:32:08 +02:00
|
|
|
- name: "(Handler: All OSs) Reload NGINX"
|
2020-04-21 20:52:31 +02:00
|
|
|
command: "nginx -s reload"
|
|
|
|
changed_when: false
|
2019-11-18 21:09:10 +01:00
|
|
|
when:
|
|
|
|
- nginx_start | bool
|
2020-08-28 10:30:23 +02:00
|
|
|
- not ansible_check_mode | bool
|
2018-09-12 23:03:20 +02:00
|
|
|
|
2019-08-03 12:53:21 +02:00
|
|
|
- name: "(Handler: All OSs) Start NGINX Amplify Agent"
|
|
|
|
service:
|
|
|
|
name: amplify-agent
|
|
|
|
state: started
|
2018-07-18 23:59:14 +02:00
|
|
|
|
2019-08-03 12:53:21 +02:00
|
|
|
- name: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
|
|
|
|
service:
|
|
|
|
name: unit
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2019-08-03 12:53:21 +02:00
|
|
|
- name: "(Handler: FreeBSD) Start NGINX Unit"
|
|
|
|
service:
|
|
|
|
name: unitd
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2020-08-20 01:50:22 +02:00
|
|
|
|
|
|
|
- name: "(Config: All OSs) Run Logrotate"
|
|
|
|
command: logrotate -f /etc/logrotate.d/nginx
|