ansible/node: Switch group names from <type>-nodes to <type>_nodes
authorMartin Schwenke <martin@meltin.net>
Thu, 21 May 2020 07:09:10 +0000 (17:09 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 26 May 2020 03:33:30 +0000 (13:33 +1000)
This warning:

  [DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to
  allow bad characters in group names by default, this will change, but still be
  user configurable on deprecation. This feature will be removed in version 2.10.
   Deprecation warnings can be disabled by setting deprecation_warnings=False in
  ansible.cfg.

According to

  https://github.com/ansible/ansible/issues/56930#issuecomment-498659628

'-' in a group name is invalid and '_' is valid.

Signed-off-by: Martin Schwenke <martin@meltin.net>
ansible/node/ad.yml
ansible/node/base.yml
ansible/node/build.yml
ansible/node/cbuild.yml
ansible/node/nas.yml
ansible/node/roles/storage/templates/gpfs_primary_secondary.j2
ansible/node/storage.yml
ansible/node/test.yml
autocluster.py

index 79e2cc0fb8848f21a0795b5239f14256a621dc50..c71dbde592613092dc76f0431c8d531776595075 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: ad-nodes
+- hosts: ad_nodes
   remote_user: root
 
   roles:
index f5e9d5e3135586569621261b5c5d3e75f00efb34..60cbb7f29e818ee3fdd3119c486d66204b31dc8c 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: base-nodes
+- hosts: base_nodes
   remote_user: root
 
   roles:
index fe4023d4132264d5ffbd37b90d1b6bdddc2b3e84..e909a65e6d82acd68b8cf380b9f757b3d6c78f83 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: build-nodes
+- hosts: build_nodes
   remote_user: root
 
   roles:
index 1a3d474e948f8e6ce601bd5f1855cb5e646dcf8a..8e559d0e4016e6aaa091d36a49ce4444ba009b56 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: cbuild-nodes
+- hosts: cbuild_nodes
   remote_user: root
 
   roles:
index 664f78de08a9fea6e23f3f39f19d78d93a3649b9..f4efd094f88c9dac5ff27a2e66987a5fdb8b7e2a 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: nas-nodes
+- hosts: nas_nodes
   remote_user: root
 
   roles:
index aec7a374c5fbe638989ddafa898b2efd6368acc1..e597eb177cd9ec86b6427d0c4a757fda59d26b79 100644 (file)
@@ -11,9 +11,9 @@
 {# Write a single line containing "primary secondary"   #}
 {#                                                      #}
 {% if num_storage_nodes >= 2                            %}
-{{ groups['storage-nodes'][0] }} {{ groups['storage-nodes'][1] }}
+{{ groups['storage_nodes'][0] }} {{ groups['storage_nodes'][1] }}
 {% elif num_storage_nodes == 1                          %}
-{{ groups['storage-nodes'][0] }} {{ groups['nas-nodes'][0] }}
+{{ groups['storage_nodes'][0] }} {{ groups['nas_nodes'][0] }}
 {% else                                                 %}
-{{ groups['nas-nodes'][0] }} {{ groups['nas-nodes'][1] }}
+{{ groups['nas_nodes'][0] }} {{ groups['nas_nodes'][1] }}
 {% endif %}
index 94032ecbbd1104db83cd5e6935265e09ab9a2ec5..0da331793ed5df8333629b94a201de0e7e5b1a90 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: storage-nodes
+- hosts: storage_nodes
   remote_user: root
 
   roles:
index a28f56db4f89bd0c55bfa1f8ae463853922050ae..88c3364212202417cc52f1dc46d3a777259ae367 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: test-nodes
+- hosts: test_nodes
   remote_user: root
 
   roles:
index a7c11ce6264e1fdec2a8641e23f55e6575b41836..34342f86d5d982e55696dd62ec1dd950eef4defa 100755 (executable)
@@ -414,7 +414,7 @@ def generate_ansible_inventory(config, outdir):
 
     with open(outfile, 'w') as stream:
         for node_type, hostnames in type_map.items():
-            print('[%s-nodes]' % node_type, file=stream)
+            print('[%s_nodes]' % node_type, file=stream)
             hostnames.sort()
             for hostname in hostnames:
                 print(hostname, file=stream)