diff --git a/roles/mailserver/tasks/main.yml b/roles/mailserver/tasks/main.yml index 2d2496b..518f641 100644 --- a/roles/mailserver/tasks/main.yml +++ b/roles/mailserver/tasks/main.yml @@ -8,17 +8,23 @@ - block: - include_tasks: install_postfix.yml - include_tasks: configure_postfix.yml - when: postfix == true + when: + - postfix is defined + - postfix == true - block: - include_tasks: install_dovecot.yml - include_tasks: configure_dovecot.yml - when: dovecot == true + when: + - dovecot is defined + - dovecot == true - block: - include_tasks: install_fetchmail.yml - include_tasks: configure_fetchmail.yml - when: fetchmail == true + when: + - fetchmail is defined + - fetchmail == true rescue: - set_fact: task_failed=true \ No newline at end of file