From 596f313b170ee372188ac851036eceebae76bd9c Mon Sep 17 00:00:00 2001 From: Frank Fischer Date: Mon, 14 Jan 2019 11:24:32 +0100 Subject: [PATCH] Allow not installing Elasticsearch deb repository key If a variable is set in Ansible, there is no way to unset it ever again, i.e. 'null' or '~' do not work. Since this value is set in defaults we have to check for content instead of defined. --- tasks/elasticsearch-Debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/elasticsearch-Debian.yml b/tasks/elasticsearch-Debian.yml index 41a2256..7b9a735 100644 --- a/tasks/elasticsearch-Debian.yml +++ b/tasks/elasticsearch-Debian.yml @@ -42,7 +42,7 @@ apt_key: url: '{{ es_apt_key }}' state: present - when: es_apt_key is defined + when: es_apt_key | string - name: Debian - Add elasticsearch repository apt_repository: