openstack_host_ca_certificates in group_vars doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-ansible |
New
|
Undecided
|
Unassigned |
Bug Description
We realized that defining the openstack_
Our use case, as an example, is to deploy a custom CA certificate that is only used by our LDAP server (for secure LDAP connection) - therefore it makes sense to deploy it only into Keystone containers.
We believe we had that working in the past, and think it stopped working since Wallaby, maybe with the introduction of ansible-role-pki.
https:/
The run_once there seems to explain the problem. In our case, we saw Ansible decided to run the task only on a Cinder container - because of that, our Keystone group_vars is ignored, and our custom CA certificate is not deployed anywhere.
Hey Adrien,
I believe you're right about the root cause of the issue. However, I believe we already do have a workaround in place.
All PKI role stanzas does contain `condition` field. So while you indeed need to use user_variables or group_vars/all, you still can limit deployment of CA to specific hosts, for example:
pki_install_ ca_keystone_ only: ca/MyRoot. crt certs/MyRoot. crt 'keystone_ all'] }}"
- src: /opt/my-
filename: /etc/ssl/
condition: "{{ inventory_hostname in groups[
Please, let us know if this solution works for you.
PS: worth to mention that you can use any name after pki_search_ install_ ca_pattern, which is pki_install_ca_.*. So pki_install_ ca_keystone_ only is real variable you can use.