ansible-roles/apache/tasks/ip_whitelist.yml
David Prevot fafff25c20
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
Add “when: not ansible_check_mode” to allow more --check
2022-12-02 17:40:43 +01:00

25 lines
568 B
YAML

---
- name: add IP addresses to private IP whitelist
lineinfile:
dest: /etc/apache2/ipaddr_whitelist.conf
line: "Require ip {{ item }}"
state: present
loop: "{{ apache_ipaddr_whitelist_present }}"
notify: reload apache
tags:
- apache
- ips
when: not ansible_check_mode
- name: remove IP addresses from private IP whitelist
lineinfile:
dest: /etc/apache2/ipaddr_whitelist.conf
line: "Require ip {{ item }}"
state: absent
loop: "{{ apache_ipaddr_whitelist_absent }}"
notify: reload apache
tags:
- apache
- ips