Fix conditional for password removal

This commit is contained in:
pemontto 2019-10-18 17:51:44 +01:00
parent 57fa4e5176
commit 3707af1488
No known key found for this signature in database
GPG key ID: EDCB93C3DA1B5DA9

View file

@ -51,7 +51,7 @@
- name: Set keystore password - name: Set keystore password
shell: echo "{{ es_ssl_keystore_password }}" | {{ es_home }}/bin/elasticsearch-keystore add -x -f 'xpack.security.{{ item }}.ssl.keystore.secure_password' shell: echo "{{ es_ssl_keystore_password }}" | {{ es_home }}/bin/elasticsearch-keystore add -x -f 'xpack.security.{{ item }}.ssl.keystore.secure_password'
no_log: True no_log: True
when: es_ssl_keystore_password and copy_keystore.changed or (es_same_keystore and copy_truststore.changed) when: es_ssl_keystore_password and (copy_keystore.changed or (es_same_keystore and copy_truststore.changed))
with_items: with_items:
- http - http
- transport - transport
@ -59,14 +59,14 @@
- name: Set truststore password - name: Set truststore password
shell: echo "{{ es_ssl_truststore_password }}" | {{ es_home }}/bin/elasticsearch-keystore add -x -f 'xpack.security.{{ item }}.ssl.truststore.secure_password' shell: echo "{{ es_ssl_truststore_password }}" | {{ es_home }}/bin/elasticsearch-keystore add -x -f 'xpack.security.{{ item }}.ssl.truststore.secure_password'
no_log: True no_log: True
when: es_ssl_truststore_password and copy_truststore.changed or (es_same_keystore and copy_keystore.changed) when: es_ssl_truststore_password and (copy_truststore.changed or (es_same_keystore and copy_keystore.changed))
with_items: with_items:
- http - http
- transport - transport
- name: Remove keystore password - name: Remove keystore password
shell: "{{ es_home }}/bin/elasticsearch-keystore remove 'xpack.security.{{ item }}.ssl.keystore.secure_password'" shell: "{{ es_home }}/bin/elasticsearch-keystore remove 'xpack.security.{{ item }}.ssl.keystore.secure_password'"
when: es_ssl_keystore_password == "" and copy_keystore.changed or (es_same_keystore and copy_truststore.changed) when: es_ssl_keystore_password == "" and (copy_keystore.changed or (es_same_keystore and copy_truststore.changed))
ignore_errors: yes ignore_errors: yes
with_items: with_items:
- http - http
@ -74,7 +74,7 @@
- name: Remove truststore password - name: Remove truststore password
shell: "{{ es_home }}/bin/elasticsearch-keystore remove 'xpack.security.{{ item }}.ssl.truststore.secure_password'" shell: "{{ es_home }}/bin/elasticsearch-keystore remove 'xpack.security.{{ item }}.ssl.truststore.secure_password'"
when: es_ssl_truststore_password == "" and copy_truststore.changed or (es_same_keystore and copy_keystore.changed) when: es_ssl_truststore_password == "" and (copy_truststore.changed or (es_same_keystore and copy_keystore.changed))
ignore_errors: yes ignore_errors: yes
with_items: with_items:
- http - http