ansible-roles/squid/tasks/log2mail.yml
Jérémy Lecour 8920ff1ee4 Add "always_run: yes" where it's pertinent
There is also the "check_mode: no", but commented,
for when we switch to Ansible 2.2
2017-01-31 11:45:35 +01:00

29 lines
590 B
YAML

---
- name: is log2mail installed?
stat:
path: /etc/log2mail/config/
#check_mode: no (for migration to Ansible 2.2)
always_run: yes
register: log2mail_config
- block:
- name: log2mail proxy config is present
template:
src: log2mail.j2
dest: /etc/log2mail/config/squid.conf
mode: "640"
owner: log2mail
group: adm
notify: restart log2mail
- name: log2mail user is in proxy group
user:
name: log2mail
groups: proxy
append: yes
state: present
notify: restart log2mail
when: log2mail_config.stat.exists