From 3d2e3a5c31299a03526cbdb8a208c5b35abdfe7a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sun, 18 Oct 2020 19:55:02 +0200 Subject: [PATCH] Simplify the conditionals. --- tasks/main.yml | 4 +--- tasks/smtp-sasl-auth.yml | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 3887806..709db08 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,9 +1,7 @@ --- - import_tasks: smtp-common-packages.yml - import_tasks: smtp-sasl-auth.yml - when: - - postfix_use_sasl_auth - - postfix_relay_client + when: postfix_relay_client - import_tasks: postfix-relay-server.yml when: postfix_relay_server - import_tasks: postfix-letsencrypt-hook.yml diff --git a/tasks/smtp-sasl-auth.yml b/tasks/smtp-sasl-auth.yml index bc4f2a2..5d48e8e 100644 --- a/tasks/smtp-sasl-auth.yml +++ b/tasks/smtp-sasl-auth.yml @@ -7,5 +7,7 @@ - name: Update SASL hash shell: postmap hash:/etc/postfix/sasl_passwd - when: update_sasl_hash is changed + when: + - update_sasl_hash is defined and update_sasl_hash is changed + - postfix_use_sasl_auth tags: postfix-relay