Add Select per-network hostnames for service_node_names to role.role.j2.yaml
authorCarlos Camacho <ccamacho@redhat.com>
Wed, 5 Oct 2016 09:29:59 +0000 (11:29 +0200)
committerCarlos Camacho <ccamacho@redhat.com>
Thu, 6 Oct 2016 12:43:27 +0000 (12:43 +0000)
This will wire up the per-network hostnames in the generic role.

Needs to land after https://review.openstack.org/#/c/378764

Partial-Bug: #1626976

Change-Id: I595f35cce03d9f416a1768aa5c349a1bb20b0e19

puppet/role.role.j2.yaml

index 66b754f..e430700 100644 (file)
@@ -325,6 +325,51 @@ outputs:
   hostname:
     description: Hostname of the server
     value: {get_attr: [{{role}}, name]}
+  hostname_map:
+    description: Mapping of network names to hostnames
+    value:
+      external:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - external
+          - {get_param: CloudDomain}
+      internal_api:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - internalapi
+          - {get_param: CloudDomain}
+      storage:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - storage
+          - {get_param: CloudDomain}
+      storage_mgmt:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - storagemgmt
+          - {get_param: CloudDomain}
+      tenant:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - tenant
+          - {get_param: CloudDomain}
+      management:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - management
+          - {get_param: CloudDomain}
+      ctlplane:
+        list_join:
+        - '.'
+        - - {get_attr: [{{role}}, name]}
+          - ctlplane
+          - {get_param: CloudDomain}
   hosts_entry:
     value:
       str_replace: