Fix linting errors

Fixed linting on xpack_security.yml
This commit is contained in:
Manuel Gutierrez 2019-09-24 11:09:21 +02:00
parent a1359495a9
commit 02425e0c85

View File

@ -78,7 +78,7 @@
- node_certs_generator
- not xpack_certs_zip.stat.exists
- not generate_CA
- ca_password == ""
- ca_password | length == 0
tags: xpack-security
- name: Generating certificates for Elasticsearch security (using provided CA | Using CA Password)
@ -86,12 +86,12 @@
/usr/share/elasticsearch/bin/elasticsearch-certutil cert
--ca-key {{ node_certs_source }}/{{ ca_key_name }} --ca-cert {{ node_certs_source }}/{{ ca_cert_name }}
--pem --in {{ node_certs_source }}/instances.yml --out {{ node_certs_source }}/certs.zip
--ca-pass {{ca_password}}
--ca-pass {{ ca_password }}
when:
- node_certs_generator
- not xpack_certs_zip.stat.exists
- not generate_CA
- ca_password != ""
- ca_password | length > 0
tags: xpack-security
- name: Verify the Elastic certificates directory
@ -131,8 +131,8 @@
- name: Unzip generated certs.zip
unarchive:
src: "{{master_certs_path}}/certs.zip"
dest: "{{master_certs_path}}/"
src: "{{ master_certs_path }}/certs.zip"
dest: "{{ master_certs_path }}/"
become: true
delegate_to: "127.0.0.1"
when:
@ -141,24 +141,24 @@
- name: Copying node's certificate from master
copy:
src: "{{item}}"
dest: "{{node_certs_destination}}/"
src: "{{ item }}"
dest: "{{ node_certs_destination }}/"
with_items:
- "{{master_certs_path}}/{{elasticsearch_node_name}}/{{ elasticsearch_node_name }}.key"
- "{{master_certs_path}}/{{elasticsearch_node_name}}/{{ elasticsearch_node_name }}.crt"
- "{{master_certs_path}}/ca/ca.crt"
- "{{ master_certs_path }}/{{ elasticsearch_node_name }}/{{ elasticsearch_node_name }}.key"
- "{{ master_certs_path }}/{{ elasticsearch_node_name }}/{{ elasticsearch_node_name }}.crt"
- "{{ master_certs_path }}/ca/ca.crt"
when:
- generate_CA
tags: xpack-security
- name: Copying node's certificate from master (Custom CA)
copy:
src: "{{item}}"
dest: "{{node_certs_destination}}/"
src: "{{ item }}"
dest: "{{ node_certs_destination }}/"
with_items:
- "{{master_certs_path}}/{{elasticsearch_node_name}}/{{ elasticsearch_node_name }}.key"
- "{{master_certs_path}}/{{elasticsearch_node_name}}/{{ elasticsearch_node_name }}.crt"
- "{{master_certs_path}}/ca/{{ca_cert_name}}"
- "{{ master_certs_path }}/{{ elasticsearch_node_name }}/{{ elasticsearch_node_name }}.key"
- "{{ master_certs_path }}/{{ elasticsearch_node_name }}/{{ elasticsearch_node_name }}.crt"
- "{{ master_certs_path }}/ca/{{ ca_cert_name }}"
when:
- not generate_CA
tags: xpack-security
@ -179,4 +179,3 @@
echo {{ elasticsearch_xpack_security_password }} | {{ node_certs_source }}/bin/elasticsearch-keystore add -xf bootstrap.password
when:
- node_certs_generator