diff --git a/tasks/main.yml b/tasks/main.yml index 359a066..a929037 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,7 +6,8 @@ - fail: msg: 'Invalid `common__iptables__state`: {{ common__iptables__state }}' - when: (common__iptables__state != 'purge') and + when: (common__iptables__state != null) and + (common__iptables__state != 'purge') and (common__iptables__state != 'remove') and (common__iptables__state != 'install') - include_tasks: iptables/purge.yml @@ -19,7 +20,8 @@ - fail: msg: 'Invalid `common__certbot__state`: {{ common__certbot__state }}' - when: (common__certbot__state != 'purge') and + when: (common__certbot__state != null) and + (common__certbot__state != 'purge') and (common__certbot__state != 'remove') and (common__certbot__state != 'install') - include_tasks: certbot/purge.yml @@ -32,7 +34,8 @@ - fail: msg: 'Invalid `common__apache__state`: {{ common__apache__state }}' - when: (common__apache__state != 'purge') and + when: (common__apache__state != null) and + (common__apache__state != 'purge') and (common__apache__state != 'remove') and (common__apache__state != 'install') - include_tasks: apache/purge.yml @@ -45,7 +48,8 @@ - fail: msg: 'Invalid `common__nginx__state`: {{ common__nginx__state }}' - when: (common__nginx__state != 'purge') and + when: (common__nginx__state != null) and + (common__nginx__state != 'purge') and (common__nginx__state != 'remove') and (common__nginx__state != 'install') - include_tasks: nginx/purge.yml