diff options
author | Aaron LI <aly@aaronly.me> | 2019-09-22 14:32:29 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-09-22 14:32:29 +0800 |
commit | 445e8e9fda6a89d7efcb18057515a324382284d4 (patch) | |
tree | d83e2b67cbb9f44aea7f5c957230a369aeb6912e /roles | |
parent | 01ea6828ec433ba41515e95fe3cf282278fc89bc (diff) | |
download | ansible-dfly-vps-445e8e9fda6a89d7efcb18057515a324382284d4.tar.bz2 |
mail: Order several tasks
Diffstat (limited to 'roles')
-rw-r--r-- | roles/mail/tasks/main.yml | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index a9f6daa..f6fd085 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -131,29 +131,6 @@ state: link force: true -- name: postfix - disable sendmail periodic tasks - blockinfile: - path: /etc/periodic.conf - marker: "# {mark} ANSIBLE MANAGED - postfix" - block: | - # Disable sendmail(8) tasks in favor of Postfix - daily_clean_hoststat_enable="NO" - daily_status_mail_rejects_enable="NO" - daily_status_include_submit_mailq="NO" - daily_submit_queuerun="NO" - -- name: postfix - enable postfix and disable sendmail - blockinfile: - path: /etc/rc.conf - marker: "# {mark} ANSIBLE MANAGED - postfix" - block: | - postfix_enable="YES" - # Completely disable sendmail(8) in favor of Postfix - sendmail_enable="NO" - sendmail_submit_enable="NO" - sendmail_outbound_enable="NO" - sendmail_msp_queue_enable="NO" - - name: postfix - copy config files copy: src: "{{ item }}" @@ -180,9 +157,32 @@ notify: reload-postfix tags: postfix +- name: postfix - enable postfix and disable sendmail + blockinfile: + path: /etc/rc.conf + marker: "# {mark} ANSIBLE MANAGED - postfix" + block: | + postfix_enable="YES" + # Completely disable sendmail(8) in favor of Postfix + sendmail_enable="NO" + sendmail_submit_enable="NO" + sendmail_outbound_enable="NO" + sendmail_msp_queue_enable="NO" + - name: postfix - start service command: rcstart postfix +- name: postfix - disable sendmail periodic tasks + blockinfile: + path: /etc/periodic.conf + marker: "# {mark} ANSIBLE MANAGED - postfix" + block: | + # Disable sendmail(8) tasks in favor of Postfix + daily_clean_hoststat_enable="NO" + daily_status_mail_rejects_enable="NO" + daily_status_include_submit_mailq="NO" + daily_submit_queuerun="NO" + - name: acme - add mail services to deploy blockinfile: path: "{{ web.acme_home }}/deploy.local.sh" |