summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/tasks')
-rw-r--r--roles/common/tasks/clamav.yml2
-rw-r--r--roles/common/tasks/mail.yml6
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/common/tasks/clamav.yml b/roles/common/tasks/clamav.yml
index 1c68598..28a8460 100644
--- a/roles/common/tasks/clamav.yml
+++ b/roles/common/tasks/clamav.yml
@@ -9,23 +9,23 @@
template: src=etc/clamav/freshclam.conf.j2
dest=/etc/clamav/freshclam.conf
owner=clamav group=adm
mode=0444
tags: freshclam
notify:
- Restart freshclam
- name: Start ClamAV
service: name={{ item }} state=started
with_items:
- clamav-daemon
- clamav-freshclam
- name: Add a 'clamav' alias
lineinfile: dest=/etc/aliases create=yes
regexp="^clamav{{':'}} "
line="clamav{{':'}} root"
- name: Compile the static local Postfix database
- postmap: cmd=postalias src=/etc/aliases db=cdb
+ postmap: cmd=postalias src=/etc/aliases db=lmdb
owner=root group=root
mode=0644
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml
index 7692c28..49815f5 100644
--- a/roles/common/tasks/mail.yml
+++ b/roles/common/tasks/mail.yml
@@ -1,27 +1,27 @@
- name: Install Postfix
apt: pkg={{ item }}
with_items:
# That one is nicer than GNU mailutils' mailx(1)
- s-nail
- postfix
- - postfix-cdb
+ - postfix-lmdb
- name: Create Postfix instances
postmulti: instance={{ postfix_instance[item].name }}
group={{ postfix_instance[item].group | default('') }}
register: r1
with_items: "{{ postfix_instance.keys() | intersect(group_names) | list }}"
notify:
- Restart Postfix
- name: Link the dynamic maps of each children to the master's
# main.cf and master.cf are specialized to each dedicated role, though
file: src=../postfix/dynamicmaps.cf
dest=/etc/postfix-{{ postfix_instance[item].name }}/dynamicmaps.cf
owner=root group=root
state=link force=yes
register: r2
with_items: "{{ postfix_instance.keys() | intersect(group_names) | list }}"
notify:
- Restart Postfix
@@ -30,33 +30,33 @@
dest=/etc/postfix/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
notify:
- Reload Postfix
- name: Add some common aliases
lineinfile: dest=/etc/aliases create=yes
regexp='^{{ item.src }}{{':'}} '
line='{{ item.src }}{{':'}} {{ item.dst }}'
with_items:
- { src: mailer-daemon, dst: 'postmaster' }
- { src: postmaster, dst: 'root' }
- { src: nobody, dst: 'root' }
- { src: root, dst: 'root@fripost.org' }
- name: Compile the static local Postfix database
- postmap: cmd=postalias src=/etc/aliases db=cdb
+ postmap: cmd=postalias src=/etc/aliases db=lmdb
owner=root group=root
mode=0644
-# We're using CDB
+# We're using LMDB
- name: Delete /etc/aliases.db
file: path=/etc/aliases.db state=absent
- name: Start Postfix
service: name=postfix state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers