Another small cleanup
This commit is contained in:
parent
3d2e3a5c31
commit
6a371e146f
|
@ -20,25 +20,25 @@
|
|||
template: src=postfix-master.cf.j2 dest=/etc/postfix/master.cf owner=root group=root mode=0444
|
||||
register: postfix_master_restart_needed
|
||||
|
||||
when: postfix_install_packages | bool
|
||||
when: postfix_install_packages
|
||||
tags: postfix-relay
|
||||
|
||||
- block:
|
||||
- name: Ensure that postfix is started and enabled
|
||||
service: name=postfix state=started enabled=yes
|
||||
when: postfix_enabled | bool
|
||||
when: postfix_enabled
|
||||
|
||||
- name: Ensure that postfix is stopped and disabled
|
||||
service: name=postfix state=stopped enabled=no
|
||||
when: not postfix_enabled | bool
|
||||
when: not postfix_enabled
|
||||
|
||||
- name: Restart postfix
|
||||
service: name=postfix state=restarted
|
||||
when: ( postfix_main_restart_needed is changed ) or ( postfix_master_restart_needed is changed )
|
||||
|
||||
when:
|
||||
- postfix_install_packages | bool
|
||||
- postfix_enabled | bool
|
||||
- postfix_install_packages
|
||||
- postfix_enabled
|
||||
tags: postfix-relay
|
||||
|
||||
- block:
|
||||
|
@ -51,8 +51,8 @@
|
|||
notify: Reload NRPE server
|
||||
|
||||
when:
|
||||
- postfix_install_packages | bool
|
||||
- postfix_nagios_check | bool
|
||||
- postfix_install_packages
|
||||
- postfix_nagios_check
|
||||
tags: [ 'postfix-relay', 'nagios', 'nrpe' ]
|
||||
|
||||
- block:
|
||||
|
@ -64,5 +64,5 @@
|
|||
yum: pkg={{ postfix_relay_rh_pkgs }} state=absent
|
||||
when: ansible_distribution_file_variety == "RedHat"
|
||||
|
||||
when: not postfix_install_packages | bool
|
||||
when: not postfix_install_packages
|
||||
tags: postfix-relay
|
||||
|
|
Loading…
Reference in New Issue