Migrate smtp-mm machines over to ansible. Ticket 4219. Thanks janeznemanic!

This commit is contained in:
Kevin Fenzi 2014-03-03 19:51:44 +00:00
parent 98c6f2ed59
commit ead7662594
37 changed files with 10160 additions and 9 deletions

View file

@ -143,10 +143,26 @@
copy: src={{ item }} dest=/etc/postfix/main.cf
first_available_file:
- "{{ postfix_maincf }}"
- postfix/main.cf.{{ ansible_fqdn }}
- postfix/main.cf.{{ host_group }}
- postfix/main.cf.{{ postfix_group }}
- postfix/main.cf
- "postfix/main.cf/main.cf.{{ ansible_fqdn }}"
- "postfix/main.cf/main.cf.{{ host_group }}"
- "postfix/main.cf/main.cf.{{ postfix_group }}"
- "postfix/main.cf/main.cf"
notify:
- restart postfix
tags:
- postfix
- config
- name: install /etc/postfix/master.cf file
copy: src={{ item }} dest=/etc/postfix/master.cf mode=0644
with_first_found:
- "{{ postfix_mastercf }}"
- "postfix/master.cf/master.cf.{{ ansible_fqdn }}"
- "postfix/master.cf/master.cf.{{ inventory_hostname }}"
- "postfix/master.cf/master.cf.{{ host_group }}"
- "postfix/master.cf/master.cf.{{ postfix_group }}"
- "postfix/master.cf/master.cf"
when: inventory_hostname.startswith('smtp-mm')
notify:
- restart postfix
tags:
@ -158,6 +174,23 @@
tags:
- service
- name: install /etc/postfix/transport file
copy: src="postfix/{{ postfix_transport_filename }}" dest=/etc/postfix/transport
when: inventory_hostname.startswith('smtp-mm')
notify:
- restart postfix
- rebuild postfix transport
tags:
- postfix
- config
- name: rebuild transport
command: /usr/sbin/postmap /etc/postfix/transport
when: inventory_hostname.startswith('smtp-mm')
tags:
- config
- postfix
#
# This task installs some common scripts to /usr/local/bin
# scripts are under roles/base/files/common-scripts