From 4d8b78f9e29c24f5eac28d1e71161d521aa569e2 Mon Sep 17 00:00:00 2001 From: agopi Date: Wed, 22 Aug 2018 11:41:41 -0400 Subject: [PATCH] Adding mistral collection Collecting mistral config data Change-Id: Ieb9d04c36ac4b5ad788288ff47970f807593981d --- ansible/gather/roles/mistral/tasks/main.yml | 22 +++++++++++++++++++++ ansible/gather/site.yml | 1 + ansible/oooq/gather-metadata.yml | 1 + 3 files changed, 24 insertions(+) create mode 100644 ansible/gather/roles/mistral/tasks/main.yml diff --git a/ansible/gather/roles/mistral/tasks/main.yml b/ansible/gather/roles/mistral/tasks/main.yml new file mode 100644 index 000000000..724b96d1f --- /dev/null +++ b/ansible/gather/roles/mistral/tasks/main.yml @@ -0,0 +1,22 @@ +--- +# +# Tasks to get mistral facts +# + +- name: Check that mistral is installed + become: true + stat: path=/etc/mistral/mistral.conf + register: mistral_config + +- name: Parse Mistral config + become: true + command: python /tmp/openstack-config-parser.py mistral /tmp/out.yml + when: mistral_config.stat.exists + +- name: Fetch output + fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes + when: mistral_config.stat.exists + +- name: Load configuration variables + include_vars: /tmp/out-{{ inventory_hostname }}.yml + when: mistral_config.stat.exists diff --git a/ansible/gather/site.yml b/ansible/gather/site.yml index e384dd9fb..39a308168 100644 --- a/ansible/gather/site.yml +++ b/ansible/gather/site.yml @@ -28,6 +28,7 @@ roles: - common - undercloud + - mistral - hosts: browbeat remote_user: "{{ browbeat_user }}" diff --git a/ansible/oooq/gather-metadata.yml b/ansible/oooq/gather-metadata.yml index de362386c..366d2e498 100644 --- a/ansible/oooq/gather-metadata.yml +++ b/ansible/oooq/gather-metadata.yml @@ -28,6 +28,7 @@ roles: - browbeat-metadata/common - browbeat-metadata/undercloud + - browbeat-metadata/mistral - name: Dump metadata to files hosts: undercloud