diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index 95fa0aab10..ec83bd11f4 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -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 diff --git a/doc/source/contributor/vagrant-dev-env.rst b/doc/source/contributor/vagrant-dev-env.rst index 9edbedaee1..ed56654f19 100644 --- a/doc/source/contributor/vagrant-dev-env.rst +++ b/doc/source/contributor/vagrant-dev-env.rst @@ -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 diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst index f9e80abbd3..80a7f101d0 100644 --- a/doc/source/user/quickstart.rst +++ b/doc/source/user/quickstart.rst @@ -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. diff --git a/tests/check-config.sh b/tests/check-config.sh index b407f4d342..f78b7fab9d 100755 --- a/tests/check-config.sh +++ b/tests/check-config.sh @@ -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 \ diff --git a/tools/init-runonce b/tools/init-runonce index 5dd9c6b815..9a93216b50 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -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."