nginx: different way of dealing with check-mode
This commit is contained in:
parent
ba827b79d9
commit
8f86584605
|
@ -5,8 +5,8 @@
|
||||||
dest: /etc/nginx/snippets/ipaddr_whitelist
|
dest: /etc/nginx/snippets/ipaddr_whitelist
|
||||||
line: "allow {{ item }};"
|
line: "allow {{ item }};"
|
||||||
state: present
|
state: present
|
||||||
|
create: yes
|
||||||
loop: "{{ nginx_ipaddr_whitelist_present }}"
|
loop: "{{ nginx_ipaddr_whitelist_present }}"
|
||||||
when: not ansible_check_mode
|
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
@ -18,7 +18,6 @@
|
||||||
line: "allow {{ item }};"
|
line: "allow {{ item }};"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ nginx_ipaddr_whitelist_absent }}"
|
loop: "{{ nginx_ipaddr_whitelist_absent }}"
|
||||||
when: not ansible_check_mode
|
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
tags:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
Loading…
Reference in a new issue