From fc54e310200d417acc981bd810b0766d681e1962 Mon Sep 17 00:00:00 2001 From: jkilpatr Date: Mon, 10 Oct 2016 14:05:40 -0400 Subject: [PATCH] Add Glance metadata parsing this could not quite follow the existing pattern due to the fact that glance has multiple independent config files. So this uses a fileglob loop to find all the configuration files in the /etc/glance directory and load each of them in turn. Change-Id: I259bef0d022500b3865926fc36f289c6a17ec5db --- ansible/gather/roles/glance/tasks/main.yml | 20 ++++++++++++++++++++ ansible/gather/site.yml | 1 + ci-scripts/tripleo/install-and-check.sh | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ansible/gather/roles/glance/tasks/main.yml diff --git a/ansible/gather/roles/glance/tasks/main.yml b/ansible/gather/roles/glance/tasks/main.yml new file mode 100644 index 000000000..d7d2b3c68 --- /dev/null +++ b/ansible/gather/roles/glance/tasks/main.yml @@ -0,0 +1,20 @@ +--- +# +# Tasks to get Glance facts +# + +- name: Parse Glance config + become: true + shell: python /tmp/openstack-config-parser.py glance {{ item }} /tmp/{{ item | basename }}.yml + with_fileglob: + - /etc/glance/*.conf + +- name: Fetch output + fetch: src=/tmp/{{ item | basename }}.yml dest=/tmp/{{ item | basename }}.yml flat=yes + with_fileglob: + - /etc/glance/*.conf + +- name: Load configuration variables + include_vars: /tmp/{{ item | basename }}.yml + with_fileglob: + - /etc/glance/*.conf diff --git a/ansible/gather/site.yml b/ansible/gather/site.yml index 4fb9bd80c..8de3a55ed 100644 --- a/ansible/gather/site.yml +++ b/ansible/gather/site.yml @@ -19,6 +19,7 @@ - heat - mysql - rabbitmq + - glance - hosts: undercloud remote_user: "{{ local_remote_user }}" diff --git a/ci-scripts/tripleo/install-and-check.sh b/ci-scripts/tripleo/install-and-check.sh index 4fcdf9496..f7b834418 100755 --- a/ci-scripts/tripleo/install-and-check.sh +++ b/ci-scripts/tripleo/install-and-check.sh @@ -125,7 +125,7 @@ time deployCloud time deployBrowbeat pushd $WORKSPACE/browbeat -if [[ $($DIFF_CMD | grep -i metadata) != "" ]] +if [[ $($DIFF_CMD | grep -i gather) != "" ]] then time runGather fi