Merge "Enable Zaqar API SSL"
[apex-tripleo-heat-templates.git] / puppet / role.role.j2.yaml
1 {# ## Some variables are set to enable rendering backwards compatible templates #}
2 {# ## where a few parameter/resource names don't match the expected pattern #}
3 {# ## FIXME: we need some way to deprecate the old inconsistent parameters #}
4 {%- if role.name == 'Controller' -%}
5   {%- set deprecated_extraconfig_param  = 'controllerExtraConfig'  -%}
6 {% endif %}
7 heat_template_version: pike
8 description: 'OpenStack {{role.name}} node configured by Puppet'
9 parameters:
10   Overcloud{{role.name}}Flavor:
11     description: Flavor for the {{role.name}} node.
12     default: baremetal
13     type: string
14 {% if role.disable_constraints is not defined %}
15     constraints:
16       - custom_constraint: nova.flavor
17 {% endif %}
18   {{role.name}}Image:
19     type: string
20     default: overcloud-full
21 {% if role.disable_constraints is not defined %}
22     constraints:
23       - custom_constraint: glance.image
24 {% endif %}
25   ImageUpdatePolicy:
26     default: 'REBUILD_PRESERVE_EPHEMERAL'
27     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
28     type: string
29   KeyName:
30     description: Name of an existing Nova key pair to enable SSH access to the instances
31     type: string
32     default: default
33 {% if role.disable_constraints is not defined %}
34     constraints:
35       - custom_constraint: nova.keypair
36 {% endif %}
37   NeutronPhysicalBridge:
38     default: 'br-ex'
39     description: An OVS bridge to create for accessing tenant networks.
40     type: string
41   NeutronPublicInterface:
42     default: nic1
43     description: Which interface to add to the NeutronPhysicalBridge.
44     type: string
45   ServiceNetMap:
46     default: {}
47     description: Mapping of service_name -> network name. Typically set
48                  via parameter_defaults in the resource registry.
49     type: json
50   EndpointMap:
51     default: {}
52     description: Mapping of service endpoint -> protocol. Typically set
53                  via parameter_defaults in the resource registry.
54     type: json
55   UpdateIdentifier:
56     default: ''
57     type: string
58     description: >
59       Setting to a previously unused value during stack-update will trigger
60       package update on all nodes
61   Hostname:
62     type: string
63     default: '' # Defaults to Heat created hostname
64   HostnameMap:
65     type: json
66     default: {}
67     description: Optional mapping to override hostnames
68   ExtraConfig:
69     default: {}
70     description: |
71       Additional hiera configuration to inject into the cluster. Note
72       that {{role.name}}ExtraConfig takes precedence over ExtraConfig.
73     type: json
74   {{role.name}}ExtraConfig:
75     default: {}
76     description: |
77       Role specific additional hiera configuration to inject into the cluster.
78     type: json
79 {%- if deprecated_extraconfig_param is defined %}
80   {{deprecated_extraconfig_param}}:
81     default: {}
82     description: |
83       DEPRECATED use {{role.name}}ExtraConfig instead
84     type: json
85 {%- endif %}
86   {{role.name}}IPs:
87     default: {}
88     type: json
89   NetworkDeploymentActions:
90     type: comma_delimited_list
91     description: >
92       Heat action when to apply network configuration changes
93     default: ['CREATE']
94   SoftwareConfigTransport:
95     default: POLL_SERVER_CFN
96     description: |
97       How the server should receive the metadata required for software configuration.
98     type: string
99     constraints:
100     - allowed_values: [POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL, ZAQAR_MESSAGE]
101   CloudDomain:
102     default: 'localdomain'
103     type: string
104     description: >
105       The DNS domain used for the hosts. This must match the
106       overcloud_domain_name configured on the undercloud.
107   {{role.name}}ServerMetadata:
108     default: {}
109     description: >
110       Extra properties or metadata passed to Nova for the created nodes in
111       the overcloud. It's accessible via the Nova metadata API. This option is
112       role-specific and is merged with the values given to the ServerMetadata
113       parameter.
114     type: json
115   ServerMetadata:
116     default: {}
117     description: >
118       Extra properties or metadata passed to Nova for the created nodes in
119       the overcloud. It's accessible via the Nova metadata API. This applies to
120       all roles and is merged with a role-specific metadata parameter.
121     type: json
122   {{role.name}}SchedulerHints:
123     type: json
124     description: Optional scheduler hints to pass to nova
125     default: {}
126   NodeIndex:
127     type: number
128     default: 0
129   ServiceConfigSettings:
130     type: json
131     default: {}
132   ServiceNames:
133     type: comma_delimited_list
134     default: []
135   MonitoringSubscriptions:
136     type: comma_delimited_list
137     default: []
138   ServiceMetadataSettings:
139     type: json
140     default: {}
141   ConfigCommand:
142     type: string
143     description: Command which will be run whenever configuration data changes
144     default: os-refresh-config --timeout 14400
145   ConfigCollectSplay:
146     type: number
147     default: 30
148     description: |
149       Maximum amount of time to possibly to delay configuation collection
150       polling. Defaults to 30 seconds. Set to 0 to disable it which will cause
151       the configuration collection to occur as soon as the collection process
152       starts.  This setting is used to prevent the configuration collection
153       processes from polling all at the exact same time.
154   LoggingSources:
155     type: json
156     default: []
157   LoggingGroups:
158     type: comma_delimited_list
159     default: []
160   UpgradeInitCommand:
161     type: string
162     description: |
163       Command or script snippet to run on all overcloud nodes to
164       initialize the upgrade process. E.g. a repository switch.
165     default: ''
166   UpgradeInitCommonCommand:
167     type: string
168     description: |
169       Common commands required by the upgrades process. This should not
170       normally be modified by the operator and is set and unset in the
171       major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
172       environment files.
173     default: ''
174   DeploymentServerBlacklistDict:
175     default: {}
176     type: json
177     description: >
178       Map of server hostnames to blacklist from any triggered
179       deployments. If the value is 1, the server will be blacklisted. This
180       parameter is generated from the parent template.
181   RoleParameters:
182     type: json
183     description: Role Specific Parameters
184     default: {}
185   DeploymentSwiftDataMap:
186     type: json
187     description: |
188       Map of servers to Swift container and object for storing deployment data.
189       The keys are the Heat assigned hostnames, and the value is a map of the
190       container/object name in Swift. Example value:
191         overcloud-controller-0:
192           container: overcloud-controller
193           object: 0
194         overcloud-controller-1:
195           container: overcloud-controller
196           object: 1
197         overcloud-controller-2:
198           container: overcloud-controller
199           object: 2
200         overcloud-novacompute-0:
201           container: overcloud-compute
202           object: 0
203     default: {}
204
205 {% if deprecated_extraconfig_param is defined %}
206 parameter_groups:
207 - label: deprecated
208   description: Do not use deprecated params, they will be removed.
209   parameters:
210   - {{deprecated_extraconfig_param}}
211 {%- endif %}
212
213 conditions:
214   server_not_blacklisted:
215     not:
216       equals:
217         - {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
218         - 1
219   deployment_swift_data_map_unset:
220     equals:
221       - get_param:
222           - DeploymentSwiftDataMap
223           - {get_param: Hostname}
224       - ""
225
226 resources:
227   {{role.name}}:
228     type: OS::TripleO::{{role.name}}Server
229     metadata:
230       os-collect-config:
231         command: {get_param: ConfigCommand}
232         splay: {get_param: ConfigCollectSplay}
233     properties:
234       image: {get_param: {{role.name}}Image}
235       image_update_policy: {get_param: ImageUpdatePolicy}
236       flavor: {get_param: Overcloud{{role.name}}Flavor}
237       key_name: {get_param: KeyName}
238       networks:
239         - network: ctlplane
240       user_data_format: SOFTWARE_CONFIG
241       user_data: {get_resource: UserData}
242       name:
243         str_replace:
244             template: {get_param: Hostname}
245             params: {get_param: HostnameMap}
246       software_config_transport: {get_param: SoftwareConfigTransport}
247       metadata:
248         map_merge:
249           - {get_param: ServerMetadata}
250           - {get_param: {{role.name}}ServerMetadata}
251           - {get_param: ServiceMetadataSettings}
252       scheduler_hints: {get_param: {{role.name}}SchedulerHints}
253       deployment_swift_data:
254         if:
255           - deployment_swift_data_map_unset
256           - {}
257           - {get_param: [DeploymentSwiftDataMap,
258                          {get_param: Hostname}]}
259
260   # Combine the NodeAdminUserData and NodeUserData mime archives
261   UserData:
262     type: OS::Heat::MultipartMime
263     properties:
264       parts:
265       - config: {get_resource: NodeAdminUserData}
266         type: multipart
267       - config: {get_resource: NodeUserData}
268         type: multipart
269       - config: {get_resource: RoleUserData}
270         type: multipart
271
272   # Creates the "heat-admin" user if configured via the environment
273   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
274   NodeAdminUserData:
275     type: OS::TripleO::NodeAdminUserData
276
277   # For optional operator additional userdata
278   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
279   NodeUserData:
280     type: OS::TripleO::NodeUserData
281
282   # For optional operator role-specific userdata
283   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
284   RoleUserData:
285     type: OS::TripleO::{{role.name}}::NodeUserData
286
287   {%- for network in networks %}
288   {{network.name}}Port:
289     type: OS::TripleO::{{role.name}}::Ports::{{network.name}}Port
290     properties:
291       ControlPlaneIP: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
292       IPPool: {get_param: {{role.name}}IPs}
293       NodeIndex: {get_param: NodeIndex}
294   {%- endfor %}
295
296   NetworkConfig:
297     type: OS::TripleO::{{role.name}}::Net::SoftwareConfig
298     properties:
299       ControlPlaneIp: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
300   {%- for network in networks %}
301       {{network.name}}IpSubnet: {get_attr: [{{network.name}}Port, ip_subnet]}
302   {%- endfor %}
303
304   NetIpMap:
305     type: OS::TripleO::Network::Ports::NetIpMap
306     properties:
307       ControlPlaneIp: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
308   {%- for network in networks %}
309       {{network.name}}Ip: {get_attr: [{{network.name}}Port, ip_address]}
310       {{network.name}}IpSubnet: {get_attr: [{{network.name}}Port, ip_subnet]}
311       {{network.name}}IpUri: {get_attr: [{{network.name}}Port, ip_address_uri]}
312   {%- endfor %}
313
314   NetHostMap:
315     type: OS::Heat::Value
316     properties:
317       type: json
318       value:
319         external:
320           fqdn:
321             list_join:
322             - '.'
323             - - {get_attr: [{{role.name}}, name]}
324               - external
325               - {get_param: CloudDomain}
326           short:
327             list_join:
328             - '.'
329             - - {get_attr: [{{role.name}}, name]}
330               - external
331         internal_api:
332           fqdn:
333             list_join:
334             - '.'
335             - - {get_attr: [{{role.name}}, name]}
336               - internalapi
337               - {get_param: CloudDomain}
338           short:
339             list_join:
340             - '.'
341             - - {get_attr: [{{role.name}}, name]}
342               - internalapi
343         storage:
344           fqdn:
345             list_join:
346             - '.'
347             - - {get_attr: [{{role.name}}, name]}
348               - storage
349               - {get_param: CloudDomain}
350           short:
351             list_join:
352             - '.'
353             - - {get_attr: [{{role.name}}, name]}
354               - storage
355         storage_mgmt:
356           fqdn:
357             list_join:
358             - '.'
359             - - {get_attr: [{{role.name}}, name]}
360               - storagemgmt
361               - {get_param: CloudDomain}
362           short:
363             list_join:
364             - '.'
365             - - {get_attr: [{{role.name}}, name]}
366               - storagemgmt
367         tenant:
368           fqdn:
369             list_join:
370             - '.'
371             - - {get_attr: [{{role.name}}, name]}
372               - tenant
373               - {get_param: CloudDomain}
374           short:
375             list_join:
376             - '.'
377             - - {get_attr: [{{role.name}}, name]}
378               - tenant
379         management:
380           fqdn:
381             list_join:
382             - '.'
383             - - {get_attr: [{{role.name}}, name]}
384               - management
385               - {get_param: CloudDomain}
386           short:
387             list_join:
388             - '.'
389             - - {get_attr: [{{role.name}}, name]}
390               - management
391         ctlplane:
392           fqdn:
393             list_join:
394             - '.'
395             - - {get_attr: [{{role.name}}, name]}
396               - ctlplane
397               - {get_param: CloudDomain}
398           short:
399             list_join:
400             - '.'
401             - - {get_attr: [{{role.name}}, name]}
402               - ctlplane
403
404   PreNetworkConfig:
405     type: OS::TripleO::{{role.name}}::PreNetworkConfig
406     properties:
407       server: {get_resource: {{role.name}}}
408       RoleParameters: {get_param: RoleParameters}
409       ServiceNames: {get_param: ServiceNames}
410       deployment_actions: {get_attr: [DeploymentActions, value]}
411
412   NetworkDeployment:
413     type: OS::TripleO::SoftwareDeployment
414     depends_on: PreNetworkConfig
415     properties:
416       name: NetworkDeployment
417       config: {get_resource: NetworkConfig}
418       server: {get_resource: {{role.name}}}
419       actions: {get_param: NetworkDeploymentActions}
420       input_values:
421         bridge_name: {get_param: NeutronPhysicalBridge}
422         interface_name: {get_param: NeutronPublicInterface}
423       actions:
424         if:
425           - server_not_blacklisted
426           - {get_param: NetworkDeploymentActions}
427           - []
428
429   {{role.name}}UpgradeInitConfig:
430     type: OS::Heat::SoftwareConfig
431     properties:
432       group: script
433       config:
434         list_join:
435         - ''
436         - - "#!/bin/bash\n\n"
437           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
438           - get_param: UpgradeInitCommand
439           - get_param: UpgradeInitCommonCommand
440
441   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
442   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
443   {{role.name}}UpgradeInitDeployment:
444     type: OS::Heat::SoftwareDeployment
445     depends_on: NetworkDeployment
446     properties:
447       name: {{role.name}}UpgradeInitDeployment
448       server: {get_resource: {{role.name}}}
449       config: {get_resource: {{role.name}}UpgradeInitConfig}
450       actions:
451         if:
452           - server_not_blacklisted
453           - ['CREATE', 'UPDATE']
454           - []
455
456   {{role.name}}Deployment:
457     type: OS::Heat::StructuredDeployment
458     depends_on: {{role.name}}UpgradeInitDeployment
459     properties:
460       name: {{role.name}}Deployment
461       config: {get_resource: {{role.name}}Config}
462       server: {get_resource: {{role.name}}}
463       input_values:
464         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
465       actions:
466         if:
467           - server_not_blacklisted
468           - ['CREATE', 'UPDATE']
469           - []
470
471   {{role.name}}Config:
472     type: OS::Heat::StructuredConfig
473     properties:
474       group: hiera
475       config:
476         hierarchy:
477           - '"%{::uuid}"'
478           - heat_config_%{::deploy_config_name}
479           - config_step
480           - {{role.name.lower()}}_extraconfig
481           - extraconfig
482           - service_names
483           - service_configs
484           - {{role.name.lower()}}
485           - bootstrap_node # provided by allNodesConfig
486           - all_nodes # provided by allNodesConfig
487           - vip_data # provided by allNodesConfig
488           - '"%{::osfamily}"'
489         merge_behavior: deeper
490         datafiles:
491           service_names:
492             service_names: {get_param: ServiceNames}
493             sensu::subscriptions: {get_param: MonitoringSubscriptions}
494           service_configs:
495             map_replace:
496               - {get_param: ServiceConfigSettings}
497               - values: {get_attr: [NetIpMap, net_ip_map]}
498           {{role.name.lower()}}_extraconfig:
499             map_merge:
500 {%- if deprecated_extraconfig_param is defined %}
501               - {get_param: {{deprecated_extraconfig_param}}}
502 {%- endif %}
503               - {get_param: {{role.name}}ExtraConfig}
504           extraconfig: {get_param: ExtraConfig}
505           {{role.name.lower()}}:
506             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
507             tripleo::profile::base::logging::fluentd::fluentd_sources: {get_param: LoggingSources}
508             tripleo::profile::base::logging::fluentd::fluentd_groups: {get_param: LoggingGroups}
509             fqdn_internal_api: {get_attr: [NetHostMap, value, internal_api, fqdn]}
510             fqdn_storage: {get_attr: [NetHostMap, value, storage, fqdn]}
511             fqdn_storage_mgmt: {get_attr: [NetHostMap, value, storage_mgmt, fqdn]}
512             fqdn_tenant: {get_attr: [NetHostMap, value, tenant, fqdn]}
513             fqdn_management: {get_attr: [NetHostMap, value, management, fqdn]}
514             fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
515             fqdn_external: {get_attr: [NetHostMap, value, external, fqdn]}
516   {%- if 'primary' in role.tags and 'controller' in role.tags %}
517             tripleo::haproxy::service_certificate: {get_attr: [NodeTLSData, deployed_ssl_certificate_path]}
518   {%- endif -%}
519
520   # Resource for site-specific injection of root certificate
521   NodeTLSCAData:
522     depends_on: NetworkDeployment
523     type: OS::TripleO::NodeTLSCAData
524     properties:
525       server: {get_resource: {{role.name}}}
526
527   {%- if 'primary' in role.tags and 'controller' in role.tags %}
528   # Resource for site-specific passing of private keys/certificates
529   NodeTLSData:
530     depends_on: NodeTLSCAData
531     type: OS::TripleO::NodeTLSData
532     properties:
533       server: {get_resource: {{role.name}}}
534       NodeIndex: {get_param: NodeIndex}
535   {%- endif -%}
536
537   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
538   {{role.name}}ExtraConfigPre:
539     depends_on: {{role.name}}Deployment
540     type: OS::TripleO::{{role.name}}ExtraConfigPre
541     # We have to use conditions here so that we don't break backwards
542     # compatibility with templates everywhere
543     condition: server_not_blacklisted
544     properties:
545         server: {get_resource: {{role.name}}}
546
547   # Hook for site-specific additional pre-deployment config,
548   # applying to all nodes, e.g node registration/unregistration
549   NodeExtraConfig:
550     depends_on:
551       - {{role.name}}ExtraConfigPre
552   {%- if 'primary' in role.tags and 'controller' in role.tags %}
553       - NodeTLSData
554   {%- else %}
555       - NodeTLSCAData
556   {%- endif %}
557     type: OS::TripleO::NodeExtraConfig
558     # We have to use conditions here so that we don't break backwards
559     # compatibility with templates everywhere
560     condition: server_not_blacklisted
561     properties:
562         server: {get_resource: {{role.name}}}
563
564   UpdateConfig:
565     type: OS::TripleO::Tasks::PackageUpdate
566
567   UpdateDeployment:
568     type: OS::Heat::SoftwareDeployment
569     depends_on: NetworkDeployment
570     properties:
571       name: UpdateDeployment
572       config: {get_resource: UpdateConfig}
573       server: {get_resource: {{role.name}}}
574       input_values:
575         update_identifier:
576           get_param: UpdateIdentifier
577       actions:
578         if:
579           - server_not_blacklisted
580           - ['CREATE', 'UPDATE']
581           - []
582
583   DeploymentActions:
584     type: OS::Heat::Value
585     properties:
586       value:
587         if:
588           - server_not_blacklisted
589           - ['CREATE', 'UPDATE']
590           - []
591
592   SshHostPubKey:
593     type: OS::TripleO::Ssh::HostPubKey
594     depends_on: {{role.name}}Deployment
595     properties:
596         server: {get_resource: {{role.name}}}
597         deployment_actions: {get_attr: [DeploymentActions, value]}
598
599 outputs:
600   ip_address:
601     description: IP address of the server in the ctlplane network
602     value: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
603   hostname:
604     description: Hostname of the server
605     value: {get_attr: [{{role.name}}, name]}
606   hostname_map:
607     description: Mapping of network names to hostnames
608     value:
609   {%- for network in networks %}
610       {{network.name_lower|default(network.name.lower())}}: {get_attr: [NetHostMap, value, {{network.name_lower|default(network.name.lower()) }}, fqdn]}
611   {%- endfor %}
612       ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
613   hosts_entry:
614     value:
615       str_replace:
616         template: |
617           PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
618   {%- for network in networks %}
619           {{network.name}}IP {{network.name}}HOST.DOMAIN {{network.name}}HOST
620   {%- endfor %}
621           CTLPLANEIP CTLPLANEHOST.DOMAIN CTLPLANEHOST
622         params:
623           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, {{role.name}}HostnameResolveNetwork]}]}
624           DOMAIN: {get_param: CloudDomain}
625           PRIMARYHOST: {get_attr: [{{role.name}}, name]}
626   {%- for network in networks %}
627           {{network.name}}IP: {get_attr: [{{network.name}}Port, ip_address]}
628           {{network.name}}HOST: {get_attr: [NetHostMap, value, {{network.name_lower|default(network.name.lower())}}, short]}
629   {%- endfor %}
630           CTLPLANEIP: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
631           CTLPLANEHOST: {get_attr: [NetHostMap, value, ctlplane, short]}
632   known_hosts_entry:
633     description: Entry for ssh known hosts
634     value:
635       str_replace:
636         template: "PRIMARYIP,PRIMARYHOST.DOMAIN,PRIMARYHOST,\
637   {%- for network in networks %}
638 {{network.name}}IP,{{network.name}}HOST.DOMAIN,{{network.name}}HOST,\
639   {%- endfor %}
640 CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY"
641         params:
642           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, {{role.name}}HostnameResolveNetwork]}]}
643           DOMAIN: {get_param: CloudDomain}
644           PRIMARYHOST: {get_attr: [{{role.name}}, name]}
645   {%- for network in networks %}
646           {{network.name}}IP: {get_attr: [{{network.name}}Port, ip_address]}
647           {{network.name}}HOST: {get_attr: [NetHostMap, value, {{network.name_lower|default(network.name.lower())}}, short]}
648   {%- endfor %}
649           CTLPLANEIP: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
650           CTLPLANEHOST: {get_attr: [NetHostMap, value, ctlplane, short]}
651           HOSTSSHPUBKEY: {get_attr: [SshHostPubKey, ecdsa]}
652   nova_server_resource:
653     description: Heat resource handle for {{role.name}} server
654     value:
655       {get_resource: {{role.name}}}
656     condition: server_not_blacklisted
657   deployed_server_port_map:
658     description: |
659       Map of Heat created hostname of the server to ip address. This is the
660       hostname before it has been mapped with the HostnameMap parameter, and
661       the IP address from the ctlplane network. This map can be used to construct
662       the DeployedServerPortMap parameter when using split-stack.
663     value:
664       map_replace:
665         - hostname:
666             fixed_ips:
667               - ip_address: {get_attr: [{{role.name}}, networks, ctlplane, 0]}
668         - keys:
669             hostname:
670               list_join:
671                 - '-'
672                 - - {get_param: Hostname}
673                   - ctlplane
674   deployed_server_deployment_swift_data_map:
675     description:
676       Map of Heat created hostname of the server to the Swift container and object
677       used to created the temporary url for metadata polling with
678       os-collect-config.
679     value:
680       map_replace:
681         - hostname:
682             container:
683               str_split:
684                 - '/'
685                 - {get_attr: [{{role.name}}, os_collect_config, request, metadata_url]}
686                 - 5
687             object:
688               str_split:
689                 - '?'
690                 - str_split:
691                     - '/'
692                     - {get_attr: [{{role.name}}, os_collect_config, request, metadata_url]}
693                     - 6
694                 - 0
695         - keys: {hostname: {get_param: Hostname}}
696   {%- if 'primary' in role.tags and 'controller' in role.tags %}
697   tls_key_modulus_md5:
698     description: MD5 checksum of the TLS Key Modulus
699     value: {get_attr: [NodeTLSData, key_modulus_md5]}
700   tls_cert_modulus_md5:
701     description: MD5 checksum of the TLS Certificate Modulus
702     value: {get_attr: [NodeTLSData, cert_modulus_md5]}
703   {%- endif %}
704   os_collect_config:
705     description: The os-collect-config configuration associated with this server resource
706     value: {get_attr: [{{role.name}}, os_collect_config]}
707   {%- for network in networks %}
708   {{network.name_lower|default(network.name.lower())}}_ip_address:
709     description: IP address of the server in the {{network.name}} network
710     value: {get_attr: [{{network.name}}Port, ip_address]}
711   {%- endfor %}