Skip to content

Commit

Permalink
Use 'default(omit)' to skip the parameter if it is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 23, 2024
1 parent 2901a02 commit f13c39a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions automation/molecule/tests/etcd/etcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
url: "{{ patroni_etcd_protocol }}://{{ inventory_hostname }}:2379/health"
method: GET
return_content: true
validate_certs: "{% if tls_cert_generate | bool %}true{% else %}false{% endif %}"
ca_path: "{% if tls_cert_generate | bool %}{{ tls_etcd_ca_cert_path }}{% else %}''{% endif %}"
client_cert: "{% if tls_cert_generate | bool %}{{ tls_etcd_cert_path }}{% else %}''{% endif %}"
client_key: "{% if tls_cert_generate | bool %}{{ tls_etcd_privatekey_path }}{% else %}''{% endif %}"
validate_certs: "{{ tls_cert_generate | bool }}"
ca_path: "{{ tls_etcd_ca_cert_path | default(omit) }}"
client_cert: "{{ tls_etcd_cert_path | default(omit) }}"
client_key: "{{ tls_etcd_privatekey_path | default(omit) }}"
register: etcd_health_status
failed_when: "(etcd_health_status.content | from_json).health != 'true'"
when: dcs_type == "etcd"

0 comments on commit f13c39a

Please sign in to comment.