From 555026711157f6f4737d6150b1158d545839eeb1 Mon Sep 17 00:00:00 2001 From: jkilpatr Date: Fri, 3 Mar 2017 14:39:06 -0500 Subject: [PATCH] Collect undercloud.conf for metadata The undercloud.conf has some tunables that are important to know so I figured I would add it to the metadata collection Change-Id: I1d31b5a30c265807e9f37a78caa24e569687ef5b --- .../gather/roles/undercloud/tasks/main.yml | 20 +++++++++++++++++++ ansible/gather/site.yml | 1 + 2 files changed, 21 insertions(+) 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