Update kibana certs importing

This commit is contained in:
Jose M 2019-07-30 17:36:09 +02:00
parent 431bc16343
commit 2656feac52

View File

@ -14,54 +14,14 @@
- not (ansible_distribution == "Debian" and ansible_distribution_version is version('8', '<')) - not (ansible_distribution == "Debian" and ansible_distribution_version is version('8', '<'))
- not (ansible_os_family == "RedHat" and ansible_distribution_version is version('7', '<')) - not (ansible_os_family == "RedHat" and ansible_distribution_version is version('7', '<'))
- name: Check if certificate exists locally - name: Copying node's certificate from master
stat: copy:
path: "{{ node_certs_destination }}/{{ kibana_node_name }}.crt" src: "{{item}}"
register: certificate_file_exists
when:
- kibana_xpack_security
- name: Copy key & certificate files in generator node (locally)
synchronize:
src: "{{ node_certs_source }}/{{ kibana_node_name }}/"
dest: "{{node_certs_destination}}/" dest: "{{node_certs_destination}}/"
delegate_to: "{{ node_certs_generator_ip }}" with_items:
when: - "{{master_certs_destination}}/{{kibana_node_name}}/{{ kibana_node_name }}.key"
- node_certs_generator - "{{master_certs_destination}}/{{kibana_node_name}}/{{ kibana_node_name }}.crt"
- kibana_xpack_security - "{{master_certs_destination}}/ca/ca.crt"
- not certificate_file_exists.stat.exists
tags: xpack-security
- name: Copy ca certificate file in generator node (locally)
synchronize:
src: "{{ node_certs_source }}/ca/"
dest: "{{ node_certs_destination }}/"
delegate_to: "{{ node_certs_generator_ip }}"
when:
- node_certs_generator
- kibana_xpack_security
- not certificate_file_exists.stat.exists
tags: xpack-security
- name: Importing key & certificate files from generator node
command: >-
{{ rsync_path }} {{ rsync_extra_parameters }} {{ rsync_user }}@{{ node_certs_generator_ip }}:
{{ node_certs_source }}/{{ kibana_node_name }}/ {{ node_certs_destination }}/
when:
- not node_certs_generator
- kibana_xpack_security
- not certificate_file_exists.stat.exists
tags: xpack-security
- name: Importing ca certificate file from generator node
command: >-
{{ rsync_path }} {{ rsync_extra_parameters }} {{ rsync_user }}@{{ node_certs_generator_ip }}:
{{ node_certs_source }}/ca/ {{ node_certs_destination }}/
when:
- not node_certs_generator
- kibana_xpack_security
- not certificate_file_exists.stat.exists
register: check_certs_permissions
tags: xpack-security tags: xpack-security
- name: Ensuring certificates folder owner - name: Ensuring certificates folder owner