1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Update squid.yml

This commit is contained in:
A Holt 2017-12-08 05:47:21 -05:00 committed by GitHub
parent effa4f179b
commit 2063b77fb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
- name: Install Squid packages - name: Install Squid packages
package: name={{ item }} package:
state=present name: "{{ item }}"
state: present
with_items: with_items:
- "{{ proxy }}" - "{{ proxy }}"
- cadaver - cadaver
@ -12,21 +13,24 @@
when: is_ubuntu when: is_ubuntu
- name: Stop Squid - name: Stop Squid
service: name={{ proxy }} service:
state=stopped name: "{{ proxy }}"
state: stopped
when: not installing when: not installing
- name: Create the Squid user - name: Create the Squid user
user: name={{ proxy_user }} user:
createhome=False name: "{{ proxy_user }}"
shell=/bin/false createhome: False
shell: /bin/false
- name: Copy init script and config file - name: Copy init script and config file
template: src={{ item.src }} template:
dest={{ item.dest }} src: "{{ item.src }}"
owner={{ item.owner }} dest: "{{ item.dest }}"
group={{ item.group }} owner: "{{ item.owner }}"
mode={{ item.mode }} group: "{{ item.group }}"
mode: "{{ item.mode }}"
with_items: with_items:
- src: 'roles/network/templates/squid/squid.sysconfig' - src: 'roles/network/templates/squid/squid.sysconfig'
dest: '/etc/sysconfig/squid' dest: '/etc/sysconfig/squid'
@ -60,43 +64,47 @@
mode: '0755' mode: '0755'
- name: Create Squid cache directory - name: Create Squid cache directory
file: path=/library/cache file:
owner={{ proxy_user }} path: /library/cache
group={{ proxy_user }} owner: "{{ proxy_user }}"
mode=0750 group: "{{ proxy_user }}"
state=directory mode: 0750
state: directory
- name: Create Squid log directory - name: Create Squid log directory
file: path=/var/log/{{ proxy }} file:
owner={{ proxy_user }} path: "/var/log/{{ proxy }}"
group={{ proxy_user }} owner: "{{ proxy_user }}"
mode=0750 group: "{{ proxy_user }}"
state=directory mode: 0750
state: directory
- include_tasks: roles/network/tasks/dansguardian.yml - include_tasks: roles/network/tasks/dansguardian.yml
when: dansguardian_install when: dansguardian_install
- name: Add Squid to service list - name: Add 'squid' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section={{ proxy }} dest: "{{ service_filelist }}"
option='{{ item.option }}' section: {{ proxy }}
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: squid value: Squid
- option: description - option: description
value: '"Squid caches web pages the first time they are accessed, and pulls them from the cache thereafter."' value: '"Squid caches web pages the first time they are accessed, and pulls them from the cache thereafter."'
- option: enabled - option: enabled
value: "{{ squid_enabled }}" value: "{{ squid_enabled }}"
- name: Add 'dansguardian' to service list - name: Add 'dansguardian' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=dansguardian dest: "{{ service_filelist }}"
option='{{ item.option }}' section: dansguardian
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: dansguardian value: DansGuardian
- option: description - option: description
value: '"DansGuardian searches web content for objectionable references and denies access when found."' value: '"DansGuardian searches web content for objectionable references and denies access when found."'
- option: enabled - option: enabled