Added task to remove certs file after propagation.

This commit is contained in:
Jose M 2019-07-01 16:07:10 +02:00
parent 3ff5a194df
commit ab8cdd13c6

View File

@ -136,6 +136,13 @@
- elasticsearch_xpack_security - elasticsearch_xpack_security
tags: xpack-security tags: xpack-security
- name: Remove generated certs file
shell: /bin/rm -f {{node_certs_source}}/certs.zip*
when:
- node_certs_generator
- elasticsearch_xpack_security
tags: xpack-security
- name: Importing key & certificate files from generator node - name: Importing key & certificate files from generator node
shell: "{{rsync_path}} {{rsync_extra_parameters}} {{rsync_user}}@{{node_certs_generator_ip}}:{{node_certs_source}}/{{elasticsearch_node_name}}/ {{node_certs_destination}}/" shell: "{{rsync_path}} {{rsync_extra_parameters}} {{rsync_user}}@{{node_certs_generator_ip}}:{{node_certs_source}}/{{elasticsearch_node_name}}/ {{node_certs_destination}}/"
when: when:
@ -153,7 +160,6 @@
- name: Set elasticsearch bootstrap password - name: Set elasticsearch bootstrap password
shell: "echo '{{elasticsearch_xpack_security_password}}' | {{node_certs_source}}/bin/elasticsearch-keystore add -xf 'bootstrap.password'" shell: "echo '{{elasticsearch_xpack_security_password}}' | {{node_certs_source}}/bin/elasticsearch-keystore add -xf 'bootstrap.password'"
when: when:
- node_certs_generator
- elasticsearch_xpack_security - elasticsearch_xpack_security
- name: Reload systemd - name: Reload systemd