1
0
Fork 0
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:
Jerry Vonau 2017-08-09 00:29:40 -05:00 committed by georgejhunt
parent 2db2c58641
commit 43bf8174c0
5 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -58,6 +58,7 @@
tags:
- squid
- network
when: squid_install
- include: wondershaper.yml
tags:

View file

@ -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

View file

@ -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 }}"