summaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-11 00:25:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-11 00:25:21 +0000
commit7cce634eea37d7ea25d5c3ae757514333986a8bb (patch)
tree042ca007f11c094c67bfd424282e23e3c6fb89e7 /qtip
parent1542b9288c494706c93a710382b42b6975592a5c (diff)
parent4155ef0c478c4eb5513439dabd5553bf389d1803 (diff)
Merge "Fix bug in apex inventory"
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