From fc7ea3450e90971faccb8794dece2709e7d3f62f Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 9 Aug 2021 21:42:13 +0500 Subject: [PATCH] Fix bug --- tasks/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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