forked from evolix/ansible-roles
squid: don't fail when minifirewall is absent
This commit is contained in:
parent
45a3e73947
commit
63c7123985
|
@ -1,13 +1,11 @@
|
|||
---
|
||||
- name: verify that minifirewall is present
|
||||
- name: Check if Minifirewall is present
|
||||
stat:
|
||||
path: /etc/default/minifirewall
|
||||
register: minifirewall_test
|
||||
|
||||
- fail:
|
||||
msg: "You must install and configure minifirewall to use Squid"
|
||||
when: not minifirewall_test.stat.exists
|
||||
|
||||
- name: configure Minifirewall for Squid
|
||||
block:
|
||||
- name: HTTPSITES list is commented in minifirewall
|
||||
replace:
|
||||
dest: /etc/default/minifirewall
|
||||
|
@ -20,7 +18,7 @@
|
|||
line: "HTTPSITES='0.0.0.0/0'"
|
||||
insertafter: "^#HTTPSITES="
|
||||
|
||||
- name: add minifirewall rules for the proxy
|
||||
- name: add iptables rules for the proxy
|
||||
lineinfile:
|
||||
dest: /etc/default/minifirewall
|
||||
regexp: "^#? *{{ item }}"
|
||||
|
@ -37,3 +35,4 @@
|
|||
dest: /etc/default/minifirewall
|
||||
regexp: '^#.*(-t nat).*(-d X\.X\.X\.X)'
|
||||
state: absent
|
||||
when: minifirewall_test.stat.exists
|
||||
|
|
Loading…
Reference in a new issue