mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
make DG and squid respect *_install and default dansguardian_install to False
This commit is contained in:
parent
2db2c58641
commit
43bf8174c0
5 changed files with 17 additions and 10 deletions
|
@ -1,3 +1,11 @@
|
|||
- name: Install squid packages
|
||||
package: name={{ item }}
|
||||
state=present
|
||||
with_items:
|
||||
- dansguardian
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Copy dansguardian config file
|
||||
template: src=squid/dansguardian.conf.j2
|
||||
dest=/etc/dansguardian/dansguardian.conf
|
||||
|
|
|
@ -42,12 +42,12 @@
|
|||
- name: Enable dansguardian
|
||||
service: name=dansguardian
|
||||
enabled=yes
|
||||
when: dansguardian_enabled
|
||||
when: dansguardian_enabled and dansguardian_install
|
||||
|
||||
- name: Disable dansguardian
|
||||
service: name=dansguardian
|
||||
enabled=no
|
||||
when: not dansguardian_enabled
|
||||
when: not dansguardian_enabled and dansguardian_install
|
||||
|
||||
- name: Create xs_httpcache flag
|
||||
shell: echo 1 > /etc/sysconfig/xs_httpcache_on
|
||||
|
@ -82,7 +82,7 @@
|
|||
- name: Disable squid service
|
||||
service: name={{ proxy }}
|
||||
enabled=no
|
||||
when: not squid_enabled
|
||||
when: not squid_enabled and squid_install
|
||||
|
||||
- name: Remove xs_httpcache flag
|
||||
file: path=/etc/sysconfig/xs_httpcache_on
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
tags:
|
||||
- squid
|
||||
- network
|
||||
when: squid_install
|
||||
|
||||
- include: wondershaper.yml
|
||||
tags:
|
||||
|
|
|
@ -19,24 +19,23 @@
|
|||
- name: Stop dansguardian
|
||||
service: name=dansguardian
|
||||
state=stopped
|
||||
when: not dansguardian_enabled
|
||||
when: not dansguardian_enabled and dansguardian_install
|
||||
|
||||
- name: Restart dansguardian
|
||||
service: name=dansguardian
|
||||
state=restarted
|
||||
when: dansguardian_enabled
|
||||
ignore_errors: true
|
||||
when: dansguardian_enabled and dansguardian_install
|
||||
|
||||
- name: Stop squid service
|
||||
service: name={{ proxy }}
|
||||
state=stopped
|
||||
when: not squid_enabled
|
||||
when: not squid_enabled and squid_install
|
||||
|
||||
# Squid get re-loaded with dispatcher.d
|
||||
- name: Restart squid service
|
||||
service: name={{ proxy }}
|
||||
state=started
|
||||
when: squid_enabled
|
||||
when: squid_enabled and squid_install
|
||||
|
||||
- name: Restart wondershaper service
|
||||
service: name=wondershaper
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
with_items:
|
||||
- "{{ proxy }}"
|
||||
- cadaver
|
||||
- dansguardian
|
||||
tags:
|
||||
- download
|
||||
|
||||
|
@ -66,6 +65,7 @@
|
|||
state=directory
|
||||
|
||||
- include: dansguardian.yml
|
||||
when: dansguardian_install
|
||||
|
||||
- name: Stop Squid
|
||||
service: name={{ proxy }}
|
||||
|
@ -98,4 +98,3 @@
|
|||
value: '"Dansguardian searches web content for sexual references and denies access when found"'
|
||||
- option: enabled
|
||||
value: "{{ dansguardian_enabled }}"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue