squid: fix variable name

This commit is contained in:
Jérémy Lecour 2017-09-14 08:55:15 +02:00 committed by Jérémy Lecour
parent 8a139b07b2
commit ca2048f9e3
4 changed files with 7 additions and 7 deletions

View file

@ -2,5 +2,5 @@
- name: logrotate configuration - name: logrotate configuration
template: template:
src: logrotate.j2 src: logrotate.j2
dest: /etc/logrotate.d/{{ squid_daemoname }} dest: /etc/logrotate.d/{{ squid_daemon_name }}
force: no force: no

View file

@ -7,12 +7,12 @@
- name: "Set squid name (jessie)" - name: "Set squid name (jessie)"
set_fact: set_fact:
squid_daemoname: squid3 squid_daemon_name: squid3
when: ansible_distribution_release == "jessie" when: ansible_distribution_release == "jessie"
- name: "Set squid name (Debian 9 or later)" - name: "Set squid name (Debian 9 or later)"
set_fact: set_fact:
squid_daemoname: squid squid_daemon_name: squid
when: ansible_distribution_major_version | version_compare('9', '>=') when: ansible_distribution_major_version | version_compare('9', '>=')
- name: "Install Squid packages" - name: "Install Squid packages"
@ -20,7 +20,7 @@
name: '{{ item }}' name: '{{ item }}'
state: present state: present
with_items: with_items:
- "{{ squid_daemoname }}" - "{{ squid_daemon_name }}"
- squidclient - squidclient
- name: "Set alternative config file (Debian 9 or later)" - name: "Set alternative config file (Debian 9 or later)"

View file

@ -1,4 +1,4 @@
file = /var/log/{{ squid_daemoname }}/access.log file = /var/log/{{ squid_daemon_name }}/access.log
pattern = "TCP_DENIED" pattern = "TCP_DENIED"
mailto = {{ log2mail_alert_email or general_alert_email | mandatory }} mailto = {{ log2mail_alert_email or general_alert_email | mandatory }}
template = /etc/log2mail/mail template = /etc/log2mail/mail

View file

@ -1,4 +1,4 @@
/var/log/{{ squid_daemoname }}/*.log { /var/log/{{ squid_daemon_name }}/*.log {
monthly monthly
compress compress
rotate 12 rotate 12
@ -6,6 +6,6 @@
create 640 proxy adm create 640 proxy adm
sharedscripts sharedscripts
postrotate postrotate
test ! -e /var/run/{{ squid_daemoname }}.pid || /usr/sbin/{{ squid_daemoname }} -k rotate test ! -e /var/run/{{ squid_daemon_name }}.pid || /usr/sbin/{{ squid_daemon_name }} -k rotate
endscript endscript
} }