TG
Size: a a a
TG
ВК
- name: Test
block:
- name: Configure Nginx vhost
become: yes
template:
src: vhost.j2
dest: "/etc/nginx/conf.d/{{ vhost_name }}.conf"
owner: root
group: root
notify: Slack 0
changed_when: true
- name: Reload Nginx
become: yes
service:
name: nginx
state: reloaded
notify: Slack 0
changed_when: true
- name: Configtest Nginx
become: yes
shell: "/usr/sbin/nginx -t"
notify: Slack 0
changed_when: true
rescue:
- name: make sure all handlers run
meta: flush_handlers
notify: Slack 1
ВК
PLAY [all] *************************************************************************************
TASK [proxy_vhost : Configure Nginx vhost] *****************************************************
changed: [192.168.172.96]
TASK [proxy_vhost : Reload Nginx] **************************************************************
changed: [192.168.172.96]
TASK [proxy_vhost : Configtest Nginx] **********************************************************
changed: [192.168.172.96]
RUNNING HANDLER [proxy_vhost : Slack 0] ********************************************************
ok: [192.168.172.96]
PLAY RECAP *************************************************************************************
192.168.172.96 : ok=4 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
TG
- name: Test
block:
- name: Configure Nginx vhost
become: yes
template:
src: vhost.j2
dest: "/etc/nginx/conf.d/{{ vhost_name }}.conf"
owner: root
group: root
notify: Slack 0
changed_when: true
- name: Reload Nginx
become: yes
service:
name: nginx
state: reloaded
notify: Slack 0
changed_when: true
- name: Configtest Nginx
become: yes
shell: "/usr/sbin/nginx -t"
notify: Slack 0
changed_when: true
rescue:
- name: make sure all handlers run
meta: flush_handlers
notify: Slack 1
TG
ВК
TG
VC
ВК
ВК
TG
TG
TG
TG
TG
ВК
TG
ВК
A
VC