Add ca_path for module uri in opensearch role

Fixes an deploy opensearch whith enable TLS on the internal VIP

Closes-Bug: #2073224
Change-Id: I50ce48c4e3c645e2f3aeee4913a9bc9ee506040a
This commit is contained in:
Petr Slavchenkov 2024-07-16 04:58:13 +00:00 committed by Michal Nasiadka
parent 362cf2bbe3
commit aed500c140
3 changed files with 10 additions and 0 deletions
ansible/roles/opensearch
releasenotes/notes

@ -13,6 +13,7 @@
return_content: yes
body: "{{ opensearch_shard_body | to_json }}" # noqa jinja[invalid]
body_format: json
ca_path: "{{ openstack_cacert }}"
delegate_to: "{{ groups['opensearch'][0] }}"
run_once: true
listen: "Restart opensearch container"
@ -30,6 +31,7 @@
status_code: 200
return_content: yes
body_format: json
ca_path: "{{ openstack_cacert }}"
delegate_to: "{{ groups['opensearch'][0] }}"
run_once: true
retries: 10

@ -7,6 +7,7 @@
module_args:
url: "{{ opensearch_internal_endpoint }}/_cluster/stats"
status_code: 200
ca_path: "{{ openstack_cacert }}"
register: result
until: result.get('status') == 200
retries: 30
@ -23,6 +24,7 @@
method: GET
status_code: 200, 404
return_content: yes
ca_path: "{{ openstack_cacert }}"
register: opensearch_retention_policy_check
delegate_to: "{{ groups['opensearch'][0] }}"
run_once: true
@ -39,6 +41,7 @@
return_content: yes
body: "{{ opensearch_retention_policy | from_yaml | to_json }}"
body_format: json
ca_path: "{{ openstack_cacert }}"
register: opensearch_retention_policy_create
delegate_to: "{{ groups['opensearch'][0] }}"
run_once: true
@ -59,6 +62,7 @@
return_content: yes
body: "{{ opensearch_set_policy_body | to_json }}"
body_format: json
ca_path: "{{ openstack_cacert }}"
delegate_to: "{{ groups['opensearch'][0] }}"
run_once: true
changed_when: opensearch_retention_policy_create.status == 201

@ -0,0 +1,4 @@
---
fixes:
- |
Fixes an deploy opensearch with enable TLS on the internal VIP.