[stable/zed] Pin to OS_CLOUD=atmosphere for <= 20.04
This is to fix and workaround and issue where running Ansible
against those hosts with containerized OpenStack CLI causes
issues for those versions.
This is a stable/zed patch only since we don't think people
will be running 20.04 after Zed.
diff --git a/roles/openstack_cli/templates/atmosphere.sh.j2 b/roles/openstack_cli/templates/atmosphere.sh.j2
index 9717677..ba1c00e 100644
--- a/roles/openstack_cli/templates/atmosphere.sh.j2
+++ b/roles/openstack_cli/templates/atmosphere.sh.j2
@@ -8,7 +8,11 @@
--volume {{ '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro' if ansible_facts['os_family']
in ['Debian'] else '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt:/etc/ssl/certs/ca-certificates.crt:ro' }} \
{% endif %}
+{% if ansible_facts['distribution_version'] | ansible.builtin.version('20.04', '<=') %}
+ --env OS_CLOUD=atmosphere \
+{% else %}
--env-file <(env | grep OS_) \
+{% endif %}
{{ atmosphere_images['openstack_cli'] }}'
alias openstack='osc openstack'
alias nova='osc nova'