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.
This commit is contained in:
Frank Fischer 2019-01-14 11:24:32 +01:00
parent b37723aa1f
commit 596f313b17

View file

@ -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: