From 451947080aea36c5c8d1ed4202a2279d111ff16b Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Thu, 16 Apr 2020 23:43:29 +0200 Subject: [PATCH] Add ports check --- plays/postdeploy/lib/http.yml | 1 + plays/postdeploy/lib/https.yml | 1 + plays/postdeploy/lib/proxy.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/plays/postdeploy/lib/http.yml b/plays/postdeploy/lib/http.yml index 98d46c5..1ba9d18 100644 --- a/plays/postdeploy/lib/http.yml +++ b/plays/postdeploy/lib/http.yml @@ -5,3 +5,4 @@ mappings: - "http:80:{{ config.vars.port }}" state: present + when: "'port' in config.vars" diff --git a/plays/postdeploy/lib/https.yml b/plays/postdeploy/lib/https.yml index 48def34..6aceefe 100644 --- a/plays/postdeploy/lib/https.yml +++ b/plays/postdeploy/lib/https.yml @@ -15,3 +15,4 @@ mappings: - "https:443:{{ config.vars.port }}" state: present + when: "'port' in config.vars" diff --git a/plays/postdeploy/lib/proxy.yml b/plays/postdeploy/lib/proxy.yml index 75377af..c100f39 100644 --- a/plays/postdeploy/lib/proxy.yml +++ b/plays/postdeploy/lib/proxy.yml @@ -5,3 +5,4 @@ mappings: - "http:{{ config.vars.port }}:{{ config.vars.port }}" state: absent + when: "'port' in config.vars"