Fix warnings on same name of host and group in Ansible 2.3 73/33473/2
authorYujun Zhang <zhang.yujunz@zte.com.cn>
Tue, 18 Apr 2017 11:07:26 +0000 (19:07 +0800)
committerYujun Zhang <zhang.yujunz@zte.com.cn>
Tue, 18 Apr 2017 11:17:05 +0000 (19:17 +0800)
Change-Id: Iedf0d609a62b956e1f0cd5e941a8fd27e1abc685
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
qtip/ansible_library/modules/fuel.py
resources/template/hosts.j2
tests/integration/hosts.default
tests/integration/run.yaml
tests/unit/ansible_library/modules/fuel_test.py

index ea2d78b..5ec45dd 100644 (file)
@@ -100,7 +100,6 @@ def generate_inventory(nodes):
             'cluster': cluster_id,
             'ansible_ssh_host': node['ip']
         }
-        hosts["node-{}".format(node['id'])].append(hostname)
         hosts_meta[hostname] = node_meta
 
     return {'hosts': hosts, 'hosts_meta': hosts_meta}
index 868a4e5..2ebf3c8 100644 (file)
@@ -1,7 +1,4 @@
-[fuel-master]
 fuel-master
-
-[local]
 localhost   ansible_connection=local
 
 [fuel-groups:children]
index 9b91eea..6573972 100644 (file)
@@ -1,6 +1,4 @@
-[fuel-master]
 fuel-master
 
 [local]
 localhost   ansible_connection=local
-
index 7545a65..10428ac 100644 (file)
@@ -33,7 +33,7 @@
     delegate_to: localhost
     tags: [calculate]
 
-- hosts: local
+- hosts: localhost
   tasks:
   - name: aggregate QPI results from all tested nodes
     aggregate:
@@ -42,7 +42,7 @@
 
 # Generate and publish report
 
-- hosts: local
+- hosts: localhost
   tasks:
   - name: create report folder
     file:
index 6a440e0..e004fc1 100644 (file)
@@ -32,13 +32,7 @@ def test_generate_inventory(data_root):
                            u'node-28',
                            u'node-25',
                            u'node-27'],
-        u'mongo': [u'node-24'],
-        'node-23': [u'node-23'],
-        'node-24': [u'node-24'],
-        'node-25': [u'node-25'],
-        'node-26': [u'node-26'],
-        'node-27': [u'node-27'],
-        'node-28': [u'node-28']}
+        u'mongo': [u'node-24']}
     assert dict(inventory['hosts_meta']) == {
         u'node-23': {'ansible_ssh_host': u'10.20.11.10', 'cluster': 4, 'ip': u'10.20.11.10',
                      'mac': u'74:4a:a4:01:71:61', 'name': u'Untitled (71:61)', 'online': True, 'os_platform': u'ubuntu',