Fixing gather to run against containerized UC
Since OSP14 has containerized UC, the current way of checking for config file in /etc will fail and ths even though config-parser is configured to look at /var/lib/config-data the task would be skipped. Using ansible_env.HOME to source stackrc. Change-Id: I72d7d8572cdbac9b5fb3e8c8b5366b9f77dc03ec
This commit is contained in:
parent
be4e81c1de
commit
d2cc39e10d
@ -2,20 +2,16 @@
|
|||||||
#
|
#
|
||||||
# Tasks to get ceilometer facts
|
# Tasks to get ceilometer facts
|
||||||
#
|
#
|
||||||
- name: Check that Ceilometer is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/ceilometer/ceilometer.conf
|
|
||||||
register: ceilometer_config
|
|
||||||
|
|
||||||
- name: Parse Ceilometer config
|
- name: Parse Ceilometer config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py ceilometer /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py ceilometer /tmp/out.yml
|
||||||
when: ceilometer_config.stat.exists
|
register: ceilometer_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: ceilometer_config.stat.exists
|
when: ceilometer_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: ceilometer_config.stat.exists
|
when: ceilometer_parsed is succeeded
|
||||||
|
@ -2,20 +2,16 @@
|
|||||||
#
|
#
|
||||||
# Tasks to get cinder facts
|
# Tasks to get cinder facts
|
||||||
#
|
#
|
||||||
- name: Check that Ceilometer is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/cinder/cinder.conf
|
|
||||||
register: cinder_config
|
|
||||||
|
|
||||||
- name: Parse Cinder config
|
- name: Parse Cinder config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py cinder /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py cinder /tmp/out.yml
|
||||||
when: cinder_config.stat.exists
|
register: cinder_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: cinder_config.stat.exists
|
when: cinder_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: cinder_config.stat.exists
|
when: cinder_parsed is succeeded
|
||||||
|
@ -6,9 +6,13 @@
|
|||||||
- name: Parse Glance config files
|
- name: Parse Glance config files
|
||||||
become: true
|
become: true
|
||||||
command: "python /tmp/openstack-config-parser.py glance /tmp/out.yml"
|
command: "python /tmp/openstack-config-parser.py glance /tmp/out.yml"
|
||||||
|
register: glance_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: "src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes"
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
|
when: glance_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
|
when: glance_parsed is succeeded
|
||||||
|
@ -3,20 +3,16 @@
|
|||||||
# Tasks to get gnocchi config data
|
# Tasks to get gnocchi config data
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check that Gnocchi is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/gnocchi/gnocchi.conf
|
|
||||||
register: gnocchi_config
|
|
||||||
|
|
||||||
- name: Parse Gnocchi config
|
- name: Parse Gnocchi config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py gnocchi /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py gnocchi /tmp/out.yml
|
||||||
when: gnocchi_config.stat.exists
|
register: gnocchi_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: gnocchi_config.stat.exists
|
when: gnocchi_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: gnocchi_config.stat.exists
|
when: gnocchi_parsed is succeeded
|
||||||
|
@ -3,20 +3,16 @@
|
|||||||
# Tasks to get heat facts
|
# Tasks to get heat facts
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check that Heat is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/heat/heat.conf
|
|
||||||
register: heat_config
|
|
||||||
|
|
||||||
- name: Parse Heat config
|
- name: Parse Heat config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py heat /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py heat /tmp/out.yml
|
||||||
when: heat_config.stat.exists
|
register: heat_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: heat_config.stat.exists
|
when: heat_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: heat_config.stat.exists
|
when: heat_parsed is succeeded
|
||||||
|
@ -3,23 +3,19 @@
|
|||||||
# Tasks to set keystone facts
|
# Tasks to set keystone facts
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check that Keystone is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/keystone/keystone.conf
|
|
||||||
register: keystone_config
|
|
||||||
|
|
||||||
- name: Parse Keystone config
|
- name: Parse Keystone config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py keystone /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py keystone /tmp/out.yml
|
||||||
when: keystone_config.stat.exists
|
register: keystone_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: keystone_config.stat.exists
|
when: keystone_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: keystone_config.stat.exists
|
when: keystone_parsed is succeeded
|
||||||
|
|
||||||
- name: Determine if Keystone is deployed in eventlet
|
- name: Determine if Keystone is deployed in eventlet
|
||||||
shell: ps afx | grep "[Kk]eystone-all" -c
|
shell: ps afx | grep "[Kk]eystone-all" -c
|
||||||
|
@ -2,21 +2,16 @@
|
|||||||
#
|
#
|
||||||
# Tasks to get mistral facts
|
# 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
|
- name: Parse Mistral config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py mistral /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py mistral /tmp/out.yml
|
||||||
when: mistral_config.stat.exists
|
register: mistral_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: mistral_config.stat.exists
|
when: mistral_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: mistral_config.stat.exists
|
when: mistral_parsed is succeeded
|
||||||
|
@ -3,21 +3,16 @@
|
|||||||
# Tasks to get neutron facts
|
# Tasks to get neutron facts
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check that Neutron is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/neutron/neutron.conf
|
|
||||||
register: neutron_config
|
|
||||||
|
|
||||||
- name: Parse Neutron config
|
- name: Parse Neutron config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py neutron /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py neutron /tmp/out.yml
|
||||||
when: neutron_config.stat.exists
|
register: neutron_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: neutron_config.stat.exists
|
when: neutron_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: neutron_config.stat.exists
|
when: neutron_parsed is succeeded
|
||||||
|
|
||||||
|
@ -3,21 +3,16 @@
|
|||||||
# Tasks to get nova facts
|
# Tasks to get nova facts
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check that Nova is installed
|
|
||||||
become: true
|
|
||||||
stat: path=/etc/nova/nova.conf
|
|
||||||
register: nova_config
|
|
||||||
|
|
||||||
- name: Parse Nova config
|
- name: Parse Nova config
|
||||||
become: true
|
become: true
|
||||||
command: python /tmp/openstack-config-parser.py nova /tmp/out.yml
|
command: python /tmp/openstack-config-parser.py nova /tmp/out.yml
|
||||||
when: nova_config.stat.exists
|
register: nova_parsed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Fetch output
|
- name: Fetch output
|
||||||
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
fetch: src=/tmp/out.yml dest=/tmp/out-{{ inventory_hostname }}.yml flat=yes
|
||||||
when: nova_config.stat.exists
|
when: nova_parsed is succeeded
|
||||||
|
|
||||||
- name: Load configuration variables
|
- name: Load configuration variables
|
||||||
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
include_vars: /tmp/out-{{ inventory_hostname }}.yml
|
||||||
when: nova_config.stat.exists
|
when: nova_parsed is succeeded
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
when: undercloud_conf.stat.exists
|
when: undercloud_conf.stat.exists
|
||||||
|
|
||||||
- name: Get Controller Nodes number
|
- name: Get Controller Nodes number
|
||||||
shell: source ~/stackrc; nova list | grep controller | grep ACTIVE | wc -l
|
shell: source {{ ansible_env.HOME }}/stackrc; nova list | grep controller | grep ACTIVE | wc -l
|
||||||
register: controller_count
|
register: controller_count
|
||||||
when: undercloud_conf.stat.exists
|
when: undercloud_conf.stat.exists
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
when: undercloud_conf.stat.exists
|
when: undercloud_conf.stat.exists
|
||||||
|
|
||||||
- name: Get Compute Nodes number
|
- name: Get Compute Nodes number
|
||||||
shell: source ~/stackrc; nova list | grep compute | grep ACTIVE | wc -l
|
shell: source {{ ansible_env.HOME }}/stackrc; nova list | grep compute | grep ACTIVE | wc -l
|
||||||
register: compute_count
|
register: compute_count
|
||||||
when: undercloud_conf.stat.exists
|
when: undercloud_conf.stat.exists
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user