summaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-06-05 23:34:27 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-06-05 23:46:37 +0800
commit153ce732de3f84bdc80daac9a5913ce643a6ca19 (patch)
tree84d7e894207e94ba730b5d5ea594aaf43276a9a9 /resources/ansible_roles
parentcb3795a39882bb97c15ae5c9562faf577334399b (diff)
Fix bug in apex module
- the default user may not be `root` - gather facts is required for getting $HOME Change-Id: Ibe7ba31322f07f0a9fa33a01005e605dc7eb796a Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles')
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/setup.yml1
-rw-r--r--resources/ansible_roles/qtip/tasks/gather-facts-apex.yml4
2 files changed, 2 insertions, 3 deletions
diff --git a/resources/ansible_roles/qtip-generator/files/compute/setup.yml b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
index d1ab2638..f5920c1f 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/setup.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
@@ -17,7 +17,6 @@
- debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
{% else %}
- hosts: [{{ installer_group[installer_type] }}]
- gather_facts: no
roles:
- { role: qtip, tasks: generate-inventory }
{% endif %}
diff --git a/resources/ansible_roles/qtip/tasks/gather-facts-apex.yml b/resources/ansible_roles/qtip/tasks/gather-facts-apex.yml
index f7112554..a5799f3d 100644
--- a/resources/ansible_roles/qtip/tasks/gather-facts-apex.yml
+++ b/resources/ansible_roles/qtip/tasks/gather-facts-apex.yml
@@ -10,11 +10,11 @@
---
- name: gathering overcloud baremetal info
- shell: . /root/stackrc && openstack baremetal list --fields instance_uuid properties provision_state --format json
+ shell: "source {{ ansible_env.HOME}}/stackrc && openstack baremetal list --fields instance_uuid properties provision_state --format json"
register: baremetal_info
- name: gathering overcloud server info
- shell: . /root/stackrc && openstack server list --format json
+ shell: "source {{ ansible_env.HOME }}/stackrc && openstack server list --format json"
register: server_info
- name: generating inventory