nginx: different way of dealing with check-mode

This commit is contained in:
Jérémy Lecour 2024-02-06 08:44:48 +01:00 committed by Jérémy Lecour
parent ba827b79d9
commit 8f86584605
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY

View file

@ -5,8 +5,8 @@
dest: /etc/nginx/snippets/ipaddr_whitelist
line: "allow {{ item }};"
state: present
create: yes
loop: "{{ nginx_ipaddr_whitelist_present }}"
when: not ansible_check_mode
notify: reload nginx
tags:
- nginx
@ -18,7 +18,6 @@
line: "allow {{ item }};"
state: absent
loop: "{{ nginx_ipaddr_whitelist_absent }}"
when: not ansible_check_mode
notify: reload nginx
tags:
- nginx