Convert AllNodesConfig hosts config to a map
authorSteven Hardy <shardy@redhat.com>
Thu, 28 Jul 2016 11:09:15 +0000 (12:09 +0100)
committerSteven Hardy <shardy@redhat.com>
Fri, 29 Jul 2016 14:13:13 +0000 (15:13 +0100)
Currently we have hard-coded parameters for each role, but to enable
custom roles, we need to pass a generic hosts list that can be joined
for all enabled roles.

Change-Id: I0606f462ff61c3a541342b63fee7d46ebfd1f4e0
Partially-Implements: blueprint custom-roles

overcloud.yaml
puppet/all-nodes-config.yaml

index e80cb24..86b326f 100644 (file)
@@ -901,12 +901,23 @@ resources:
   allNodesConfig:
     type: OS::TripleO::AllNodes::SoftwareConfig
     properties:
-      compute_hosts: {get_attr: [Compute, hosts_entry]}
-      controller_hosts: {get_attr: [Controller, hosts_entry]}
+      hosts:
+        - list_join:
+            - '\n'
+            - {get_attr: [Compute, hosts_entry]}
+        - list_join:
+            - '\n'
+            - {get_attr: [Controller, hosts_entry]}
+        - list_join:
+            - '\n'
+            - {get_attr: [BlockStorage, hosts_entry]}
+        - list_join:
+            - '\n'
+            - {get_attr: [ObjectStorage, hosts_entry]}
+        - list_join:
+            - '\n'
+            - {get_attr: [CephStorage, hosts_entry]}
       controller_ips: {get_attr: [Controller, ip_address]}
-      block_storage_hosts: {get_attr: [BlockStorage, hosts_entry]}
-      object_storage_hosts: {get_attr: [ObjectStorage, hosts_entry]}
-      ceph_storage_hosts: {get_attr: [CephStorage, hosts_entry]}
       controller_names: {get_attr: [Controller, hostname]}
       rabbit_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
       mongo_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, MongoDbNetwork]}]}
index 803a5d4..db8bb45 100644 (file)
@@ -2,18 +2,10 @@ heat_template_version: 2015-04-30
 description: 'All Nodes Config for Puppet'
 
 parameters:
-  compute_hosts:
-    type: comma_delimited_list
-  controller_hosts:
+  hosts:
     type: comma_delimited_list
   controller_ips:
     type: comma_delimited_list
-  block_storage_hosts:
-    type: comma_delimited_list
-  object_storage_hosts:
-    type: comma_delimited_list
-  ceph_storage_hosts:
-    type: comma_delimited_list
   controller_names:
     type: comma_delimited_list
   rabbit_node_ips:
@@ -89,21 +81,7 @@ resources:
         hosts:
           list_join:
           - "\n"
-          - - list_join:
-              - "\n"
-              - {get_param: compute_hosts}
-            - list_join:
-              - "\n"
-              - {get_param: controller_hosts}
-            - list_join:
-              - "\n"
-              - {get_param: block_storage_hosts}
-            - list_join:
-              - "\n"
-              - {get_param: object_storage_hosts}
-            - list_join:
-              - "\n"
-              - {get_param: ceph_storage_hosts}
+          - {get_param: hosts}
         hiera:
           datafiles:
             bootstrap_node: