diff --git a/ansible/gather/roles/undercloud/tasks/main.yml b/ansible/gather/roles/undercloud/tasks/main.yml index ae989c1e8..194c787e8 100644 --- a/ansible/gather/roles/undercloud/tasks/main.yml +++ b/ansible/gather/roles/undercloud/tasks/main.yml @@ -2,6 +2,26 @@ # # Tasks to set undercloud facts # + + + - name: Check that the undercloud.conf exists + become: true + stat: path=/home/stack/undercloud.conf + register: undercloud_conf + + - name: Undercloud.conf + become: true + shell: python /tmp/openstack-config-parser.py undercloud /home/stack/undercloud.conf /tmp/out.yml + when: undercloud_conf.stat.exists + + - name: Fetch output + fetch: src=/tmp/out.yml dest=/tmp/out.yml flat=yes + when: undercloud_conf.stat.exists + + - name: Load configuration variables + include_vars: /tmp/out.yml + when: undercloud_conf.stat.exists + - name: Get max_connections on the database shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}' register: max_conn diff --git a/ansible/gather/site.yml b/ansible/gather/site.yml index 8de3a55ed..269a8ef42 100644 --- a/ansible/gather/site.yml +++ b/ansible/gather/site.yml @@ -25,6 +25,7 @@ remote_user: "{{ local_remote_user }}" become: true roles: + - common - undercloud - hosts: undercloud