add Final Infrastructure Setup
This commit is contained in:
commit
7733dde658
174 changed files with 204949 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Restart nginx with config check
|
||||
debug: msg="checking nginx config before restart"
|
||||
changed_when: True
|
||||
notify:
|
||||
- Check nginx configuration
|
||||
- Restart nginx
|
||||
|
||||
- name: Reload nginx with config check
|
||||
debug: msg="checking nginx config before reload"
|
||||
changed_when: True
|
||||
notify:
|
||||
- Check nginx configuration
|
||||
- Reload nginx
|
||||
|
||||
- name: Check nginx configuration
|
||||
command: "nginx -t"
|
||||
register: result
|
||||
changed_when: "result.rc != 0"
|
||||
check_mode: no
|
||||
|
||||
- name: Restart nginx
|
||||
service: name=nginx state=restarted
|
||||
|
||||
- name: Reload nginx
|
||||
service: name=nginx state=reloaded
|
||||
|
||||
# vim:ft=ansible
|
||||
Loading…
Add table
Add a link
Reference in a new issue