+- name: install postfix mysql config
+ register: postfix_mysql
+ template:
+ dest: /etc/postfix/{{ item }}
+ src: templates/{{ item }}
+ mode: u=rw,g=r,o=
+ group: postfix
+ with_items:
+ - mysql_vmail_aliases.cf
+ - mysql_vmail_senders.cf
+ - mysql_vmail_users.cf
+ when: postfix.vmail_mysql_password is defined
+- name: create empty maps
+ copy:
+ dest: /etc/postfix/{{ item }}
+ content: ""
+ force: no
+ with_items:
+ - virtual_alias_map
+ - transport_map
+ when: postfix.virtual_mailbox_domains is defined