From 4f8538a6b7d979d288cfbe9e7b3a4468c291ade0 Mon Sep 17 00:00:00 2001 From: konasp Date: Fri, 3 Mar 2017 11:45:53 +0100 Subject: [PATCH 1/3] Fixing boolean expression syntax when installing templates/license --- handlers/elasticsearch-templates.yml | 4 ++-- handlers/security/elasticsearch-xpack-activation.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handlers/elasticsearch-templates.yml b/handlers/elasticsearch-templates.yml index 68160e6..b1ff63a 100644 --- a/handlers/elasticsearch-templates.yml +++ b/handlers/elasticsearch-templates.yml @@ -17,7 +17,7 @@ status_code: 200 body_format: json body: "{{ lookup('file', item.path) }}" - when: not es_enable_xpack or not es_xpack_features is defined or not '"security" in es_xpack_features' + when: not es_enable_xpack or not es_xpack_features is defined or "security" not in es_xpack_features with_items: "{{ templates.files }}" - name: Install templates with auth @@ -30,5 +30,5 @@ force_basic_auth: yes body_format: json body: "{{ lookup('file', item.path) }}" - when: es_enable_xpack and es_xpack_features is defined and '"security" in es_xpack_features' + when: es_enable_xpack and es_xpack_features is defined and "security" in es_xpack_features with_items: "{{ templates.files }}" diff --git a/handlers/security/elasticsearch-xpack-activation.yml b/handlers/security/elasticsearch-xpack-activation.yml index afdec99..30ffa88 100644 --- a/handlers/security/elasticsearch-xpack-activation.yml +++ b/handlers/security/elasticsearch-xpack-activation.yml @@ -9,7 +9,7 @@ return_content: yes register: license_activated no_log: True - when: not '"security" in es_xpack_features' + when: "security" not in es_xpack_features failed_when: > license_activated.status != 200 or license_activated.json.license_status is not defined or @@ -27,7 +27,7 @@ return_content: yes register: license_activated no_log: True - when: '"security" in es_xpack_features' + when: "security" in es_xpack_features failed_when: > license_activated.status != 200 or license_activated.json.license_status is not defined or From 0046008bf5dc678a2e9270770624be3e826cdfa8 Mon Sep 17 00:00:00 2001 From: konasp Date: Fri, 3 Mar 2017 12:14:26 +0100 Subject: [PATCH 2/3] Fixing boolean expression syntax when installing templates/license -> adding missing quotes --- handlers/security/elasticsearch-xpack-activation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/security/elasticsearch-xpack-activation.yml b/handlers/security/elasticsearch-xpack-activation.yml index 30ffa88..bafa46c 100644 --- a/handlers/security/elasticsearch-xpack-activation.yml +++ b/handlers/security/elasticsearch-xpack-activation.yml @@ -9,7 +9,7 @@ return_content: yes register: license_activated no_log: True - when: "security" not in es_xpack_features + when: '"security" not in es_xpack_features' failed_when: > license_activated.status != 200 or license_activated.json.license_status is not defined or @@ -27,7 +27,7 @@ return_content: yes register: license_activated no_log: True - when: "security" in es_xpack_features + when: '"security" in es_xpack_features' failed_when: > license_activated.status != 200 or license_activated.json.license_status is not defined or From 0c0a48d4ae27bc86f219aed4eec7c541a7e4532a Mon Sep 17 00:00:00 2001 From: konasp Date: Fri, 3 Mar 2017 12:41:32 +0100 Subject: [PATCH 3/3] Fixing boolean expression syntax when installing templates/license -> repositioned not --- handlers/security/elasticsearch-xpack-activation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/security/elasticsearch-xpack-activation.yml b/handlers/security/elasticsearch-xpack-activation.yml index bafa46c..4b1fd3f 100644 --- a/handlers/security/elasticsearch-xpack-activation.yml +++ b/handlers/security/elasticsearch-xpack-activation.yml @@ -9,7 +9,7 @@ return_content: yes register: license_activated no_log: True - when: '"security" not in es_xpack_features' + when: 'not "security" in es_xpack_features' failed_when: > license_activated.status != 200 or license_activated.json.license_status is not defined or