source: branches/3.3/ansible/roles/smtp/tasks/main.yml @ 3655

Last change on this file since 3655 was 3655, checked in by bruno, 2 years ago

New MondoRescue? site managed with ansible now

File size: 837 bytes
Line 
1---
2
3- name: Check that postfix is installed
4  urpmi: name=postfix state=installed no-recommends=yes
5  tags: smtp
6
7- name: DEBUG vars
8  debug: var=hostvars[inventory_hostname] #verbosity=2
9  #debug: var=vars #verbosity=2
10  #debug: var=smtp_role
11  #debug: var=smtp_server_ext
12
13- name: Copy postfix data files
14  copy: src={{ item }} dest=/etc/postfix/{{ item | basename }} owner=root group=root mode=0644 backup=yes
15  with_fileglob: [ 'files/{{ smtp_role }}/*' ]
16  notify:
17    - check and restart postfix
18  tags: smtp
19
20- name: Check that postfix is configured
21  template: src='templates/main.cf.j2' dest='/etc/postfix/main.cf' owner=root group=root mode=0644 backup=yes
22  notify:
23    - check and restart postfix
24  tags: smtp
25
26- name: Check that postfix is running and enabled
27  service: name=postfix state=running enabled=yes
28  tags: smtp
Note: See TracBrowser for help on using the repository browser.