Update main.yml to add rsync

This commit is contained in:
Jose M 2019-06-28 12:50:19 +02:00
parent 071e354fbd
commit e76dc5dcab

View File

@ -126,6 +126,7 @@
dest: "/usr/share/elasticsearch/instances.yml" dest: "/usr/share/elasticsearch/instances.yml"
tags: tags:
- config - config
- xpack-security
when: when:
- node_generate_certs - node_generate_certs
- elasticsearch_xpack_security - elasticsearch_xpack_security
@ -138,6 +139,27 @@
- elasticsearch_xpack_security - elasticsearch_xpack_security
tags: xpack-security tags: xpack-security
# - name: Importing certificates generated previously
# synchronize:
# mode: push
# src: /usr/share/elasticsearch/certs.zip
# dest: /usr/share/elasticsearch/certs.zip
# rsync_opts:
# - "--rsync-path='sudo rsync'"
# - "-v"
# delegate_to: "{{groups['elk'][0]}}"
# when:
# - not node_generate_certs
# - elasticsearch_xpack_security
# tags: xpack-security
- name: Importing certificate generated previously
shell: "/usr/bin/rsync -avg -e 'ssh -o StrictHostKeyChecking=no' --rsync-path='sudo rsync' vagrant@172.16.0.161:/usr/share/elasticsearch/{{elasticsearch_node_name}}/ /home/es_certificates/"
when:
- not node_generate_certs
- elasticsearch_xpack_security
tags: xpack-security
- import_tasks: "RMRedHat.yml" - import_tasks: "RMRedHat.yml"
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"