Change clouds.yaml location

It's a followup to 73a1812c58
addressing post-merge comments.

Change-Id: Idd458ad6ef29e4eee2f9e537b4eae39d26eb9f64
This commit is contained in:
Michal Nasiadka 2022-09-23 10:53:05 +02:00
parent 1aac65de0c
commit ed2cf2f5e5
5 changed files with 13 additions and 3 deletions

View File

@ -15,7 +15,7 @@
become: true
template:
src: "roles/common/templates/clouds.yaml.j2"
dest: "/etc/openstack/clouds.yaml"
dest: "{{ node_config }}/clouds.yaml"
owner: "{{ ansible_facts.user_uid }}"
group: "{{ ansible_facts.user_gid }}"
mode: 0600

View File

@ -246,6 +246,7 @@ Validate OpenStack is operational:
.. code-block:: console
kolla-ansible post-deploy
export OS_CLIENT_CONFIG_FILE=/etc/kolla/clouds.yaml
export OS_CLOUD=kolla-admin
openstack user list

View File

@ -553,6 +553,10 @@ Using OpenStack
cd kolla-ansible/tools
./kolla-ansible post-deploy
* The file will be generated in /etc/kolla/clouds.yaml, you can use it by
copying it to /etc/openstack or ~/.config/openstack or setting
OS_CLIENT_CONFIG_FILE environment variable.
#. Depending on how you installed Kolla Ansible, there is a script that will
create example networks, images, and so on.

View File

@ -21,6 +21,7 @@ function check_config {
-not -regex .*key \
-not -regex ".*ca-certificates.*" \
-not -path /etc/kolla \
-not -path /etc/kolla/clouds.yaml \
-not -regex .*-openrc.sh \
-not -name globals.yml \
-not -name header \

View File

@ -48,15 +48,19 @@ for i in curl openstack; do
done
# Test for clouds.yaml
if [[ ! -f /etc/openstack/clouds.yaml ]]; then
echo "/etc/openstack/clouds.yaml is missing."
if [[ ! -f /etc/kolla/clouds.yaml ]]; then
echo "/etc/kolla/clouds.yaml is missing."
echo " Did your deploy finish successfully?"
exit 1
fi
# Specify clouds.yaml file to use
export OS_CLIENT_CONFIG_FILE=/etc/kolla/clouds.yaml
# Select admin account from clouds.yaml
export OS_CLOUD=kolla-admin
# Test to ensure configure script is run only once
if $KOLLA_OPENSTACK_COMMAND image list | grep -q cirros; then
echo "This tool should only be run once per deployment."