Merge pull request #249 from wazuh/bypass-idempotence-tests

Bypass idempotence tests on elastic xpack
This commit is contained in:
Manuel J. Bernal 2019-09-26 15:21:18 +02:00 committed by GitHub
commit e4ad96a18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,9 @@
- node_certs_generator - node_certs_generator
- not xpack_certs_zip.stat.exists - not xpack_certs_zip.stat.exists
- generate_CA - generate_CA
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Generating certificates for Elasticsearch security (using provided CA | Without CA Password) - name: Generating certificates for Elasticsearch security (using provided CA | Without CA Password)
command: >- command: >-
@ -82,7 +84,9 @@
- not xpack_certs_zip.stat.exists - not xpack_certs_zip.stat.exists
- not generate_CA - not generate_CA
- ca_password | length == 0 - ca_password | length == 0
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Generating certificates for Elasticsearch security (using provided CA | Using CA Password) - name: Generating certificates for Elasticsearch security (using provided CA | Using CA Password)
command: >- command: >-
@ -96,7 +100,9 @@
- not xpack_certs_zip.stat.exists - not xpack_certs_zip.stat.exists
- not generate_CA - not generate_CA
- ca_password | length > 0 - ca_password | length > 0
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Verify the Elastic certificates directory - name: Verify the Elastic certificates directory
file: file:
@ -124,7 +130,9 @@
mode: 0700 mode: 0700
when: when:
- node_certs_generator - node_certs_generator
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Delete certs.zip in Generator node - name: Delete certs.zip in Generator node
file: file:
@ -132,6 +140,7 @@
path: "{{ node_certs_source }}/certs.zip" path: "{{ node_certs_source }}/certs.zip"
when: when:
- node_certs_generator - node_certs_generator
tags: molecule-idempotence-notest
- name: Unzip generated certs.zip - name: Unzip generated certs.zip
unarchive: unarchive:
@ -141,7 +150,9 @@
delegate_to: "127.0.0.1" delegate_to: "127.0.0.1"
when: when:
- node_certs_generator - node_certs_generator
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Copying node's certificate from master - name: Copying node's certificate from master
copy: copy:
@ -153,7 +164,9 @@
- "{{ master_certs_path }}/ca/ca.crt" - "{{ master_certs_path }}/ca/ca.crt"
when: when:
- generate_CA - generate_CA
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Copying node's certificate from master (Custom CA) - name: Copying node's certificate from master (Custom CA)
copy: copy:
@ -165,7 +178,9 @@
- "{{ master_certs_path }}/ca/{{ ca_cert_name }}" - "{{ master_certs_path }}/ca/{{ ca_cert_name }}"
when: when:
- not generate_CA - not generate_CA
tags: xpack-security tags:
- xpack-security
- molecule-idempotence-notest
- name: Ensuring folder permissions - name: Ensuring folder permissions
file: file:
@ -179,8 +194,11 @@
tags: xpack-security tags: xpack-security
- name: Set elasticsearch bootstrap password - name: Set elasticsearch bootstrap password
shell: >- shell: |
set -o pipefail; set -o pipefail
echo {{ elasticsearch_xpack_security_password }} | {{ node_certs_source }}/bin/elasticsearch-keystore add -xf bootstrap.password echo {{ elasticsearch_xpack_security_password }} | {{ node_certs_source }}/bin/elasticsearch-keystore add -xf bootstrap.password
args:
executable: /bin/bash
when: when:
- node_certs_generator - node_certs_generator
tags: molecule-idempotence-notest