summaryrefslogtreecommitdiffstats
path: root/tasks/postfix_basic.yml
blob: 96533dbe37c36145cbc9714f6dbfcc0d65702586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- name: install postfix
  action: yum pkg=postfix state=present
  tags:
  - postfix
  - packages

- name: /etc/postfix/main.cf
  action: copy src={{ item }} dest=/etc/postfix/main.cf
  with_first_found:
    - "{{ postfix_maincf }}"
    - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"
    - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ inventory_hostname }}"
    - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ host_group }}"
    - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ postfix_group }}"
    - "{{ roles }}/base/files/postfix/main.cf/main.cf"
  notify:
  - restart postfix
  tags:
  - postfix
  - config

- name: enable postfix to start
  action: service name=postfix state=running enabled=true
  tags:
  - service