Handle empty cert related hostvar info

When certificates are neither generated nor provided (e.g. on update)
related variables would be empty or undefined and need to be handled
accordingly.

Closes-Bug: #1845366
Change-Id: I361c90e438e79e180e2a745da82e619347fed13e
changes/26/684826/3
Brent Eagles 3 years ago committed by wes hayutin
parent db3e33380d
commit 2cbe99b429
  1. 6
      tripleo_ansible/playbooks/octavia-files.yaml

@ -63,9 +63,9 @@
octavia_confd_prefix: "/var/lib/config-data/puppet-generated/octavia"
lb_mgmt_net_id: "{{ hostvars[groups['octavia_nodes'][0]]['lb_mgmt_net_id'] }}"
lb_mgmt_secgroup_id: "{{ hostvars[groups['octavia_nodes'][0]]['lb_mgmt_secgroup_id'] }}"
private_key_content: "{{ hostvars[groups['octavia_nodes'][0]]['private_key_content'] }}"
ca_cert_content: "{{ hostvars[groups['octavia_nodes'][0]]['ca_cert_content'] }}"
service_pem_content: "{{ hostvars[groups['octavia_nodes'][0]]['service_pem_content'] }}"
private_key_content: "{{ hostvars[groups['octavia_nodes'][0]]['private_key_content'] | default('') }}"
ca_cert_content: "{{ hostvars[groups['octavia_nodes'][0]]['ca_cert_content'] | default('') }}"
service_pem_content: "{{ hostvars[groups['octavia_nodes'][0]]['service_pem_content'] | default('') }}"
generate_certs: "{{ generate_certs }}"
ca_cert_path: "{{ ca_cert_path }}"
ca_private_key_path: "{{ ca_private_key_path }}"

Loading…
Cancel
Save