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
This commit is contained in:
jkilpatr 2016-10-10 14:05:40 -04:00
parent 7642550e5c
commit fc54e31020
3 changed files with 22 additions and 1 deletions

View File

@ -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

View File

@ -19,6 +19,7 @@
- heat
- mysql
- rabbitmq
- glance
- hosts: undercloud
remote_user: "{{ local_remote_user }}"

View File

@ -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