ansible-roles/squid/tasks/main.yml

37 lines
817 B
YAML

---
- name: Include OS-specific variables
include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_release }}.yml"
- name: package is installed
apt:
name: "{{ squid_package }}"
state: present
- name: squid.conf is present
template:
src: squid.j2
dest: "{{ squid_conf_file }}"
notify: "restart {{ squid_daemon }}"
- name: evolix whitelist is present
copy:
src: whitelist-evolinux.conf
dest: "{{ squid_conf_path }}/whitelist-evolinux.conf"
force: yes
backup: yes
notify: "restart {{ squid_daemon }}"
- name: custom whitelist is present
copy:
src: whitelist-custom.conf
dest: "{{ squid_conf_path }}/whitelist-custom.conf"
force: no
notify: "restart {{ squid_daemon }}"
- include: logrotate.yml
- include: minifirewall.yml
- include: log2mail.yml