jkilpatr fc54e31020 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
2016-10-12 08:10:05 -04:00

21 lines
494 B
YAML

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