squid: add whitelist entries
This commit is contained in:
parent
acc3f90bae
commit
04314d719c
|
@ -11,6 +11,7 @@ A blank file is created at `/etc/squid3/whitelist-custom.conf` to add addresses
|
||||||
## Available variables
|
## Available variables
|
||||||
|
|
||||||
* `squid_address` : IP address for internal/outgoing traffic (default: Ansible detected IPv4 address) ;
|
* `squid_address` : IP address for internal/outgoing traffic (default: Ansible detected IPv4 address) ;
|
||||||
|
* `squid_whitelist_items` : list of URL to add to the whitelist (default: `[]`) ;
|
||||||
* `general_alert_email`: email address to send various alert messages (default: `root@localhost`).
|
* `general_alert_email`: email address to send various alert messages (default: `root@localhost`).
|
||||||
* `log2mail_alert_email`: email address to send Log2mail messages to (default: `general_alert_email`).
|
* `log2mail_alert_email`: email address to send Log2mail messages to (default: `general_alert_email`).
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,4 @@ general_alert_email: "root@localhost"
|
||||||
log2mail_alert_email: Null
|
log2mail_alert_email: Null
|
||||||
|
|
||||||
squid_address: "{{ ansible_default_ipv4.address }}"
|
squid_address: "{{ ansible_default_ipv4.address }}"
|
||||||
|
squid_whitelist_items: []
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
name: squid3
|
name: squid3
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: reload squid3
|
||||||
|
service:
|
||||||
|
name: squid3
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
- name: restart log2mail
|
- name: restart log2mail
|
||||||
service:
|
service:
|
||||||
name: log2mail
|
name: log2mail
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
force: no
|
force: no
|
||||||
notify: "restart {{ squid_daemon }}"
|
notify: "restart {{ squid_daemon }}"
|
||||||
|
|
||||||
|
- name: add some URL in whitelist
|
||||||
|
lineinfile:
|
||||||
|
insertafter: EOF
|
||||||
|
dest: "{{ squid_conf_path }}/whitelist-custom.conf"
|
||||||
|
line: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items: '{{ squid_whitelist_items }}'
|
||||||
|
notify: reload squid
|
||||||
|
|
||||||
- include: logrotate.yml
|
- include: logrotate.yml
|
||||||
|
|
||||||
- include: minifirewall.yml
|
- include: minifirewall.yml
|
||||||
|
|
Loading…
Reference in a new issue