aboutsummaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-09 15:20:24 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-09 15:39:39 +0800
commit4155ef0c478c4eb5513439dabd5553bf389d1803 (patch)
tree21ffa06b5d708ac0d4da3c3a40db6259d2036a25 /qtip
parent8c1e9c553cc6b4b8b78c31e7f5f48836c0d945e1 (diff)
Fix bug in apex inventory
The default user for overcloud should be heat-admin JIRA: QTIP-267 Change-Id: Ie868b1a925ca0eaa0292bdfb99d0e328e820f8aa Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip')
-rw-r--r--qtip/ansible_library/modules/apex_generate_inventory.py3
-rw-r--r--qtip/ansible_library/modules/fuel.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/qtip/ansible_library/modules/apex_generate_inventory.py b/qtip/ansible_library/modules/apex_generate_inventory.py
index b1cc976d..0c9500f1 100644
--- a/qtip/ansible_library/modules/apex_generate_inventory.py
+++ b/qtip/ansible_library/modules/apex_generate_inventory.py
@@ -79,7 +79,8 @@ def generate_inventory(baremetal_info, server_info):
node_ip = re.findall('.+=(\d+.\d+.\d+.\d+)$', server['Networks'])[0]
hosts[role].append(node_ip)
# To match ssh.cfg.j2 template
- hosts_meta[node_ip] = {'ansible_ssh_host': node_ip}
+ hosts_meta[node_ip] = {'ansible_ssh_host': node_ip,
+ 'ansible_user': 'heat-admin'}
for host in hosts:
hosts[host].sort()
diff --git a/qtip/ansible_library/modules/fuel.py b/qtip/ansible_library/modules/fuel.py
index 5ec45dd1..04154e34 100644
--- a/qtip/ansible_library/modules/fuel.py
+++ b/qtip/ansible_library/modules/fuel.py
@@ -98,7 +98,8 @@ def generate_inventory(nodes):
'ip': node['ip'],
'mac': node['mac'],
'cluster': cluster_id,
- 'ansible_ssh_host': node['ip']
+ 'ansible_ssh_host': node['ip'],
+ 'ansible_user': 'root'
}
hosts_meta[hostname] = node_meta