80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
heat_template_version: wallaby
|
|
parameters:
|
|
RootStackName:
|
|
description: The name of the stack/plan.
|
|
type: string
|
|
name:
|
|
type: string
|
|
default: 'deployed-server'
|
|
metadata:
|
|
type: json
|
|
default: {}
|
|
software_config_transport:
|
|
default: POLL_SERVER_CFN
|
|
type: string
|
|
ControlPlaneSubnet:
|
|
default: ctlplane-subnet
|
|
description: The name of the undercloud Neutron control plane subnet
|
|
type: string
|
|
NodePortMap:
|
|
description: >
|
|
A map of deployed port data
|
|
default: {}
|
|
type: json
|
|
|
|
resources:
|
|
deployed-server:
|
|
type: OS::Heat::DeployedServer
|
|
properties:
|
|
name: {get_param: name}
|
|
software_config_transport: {get_param: software_config_transport}
|
|
|
|
ControlPlanePortDeployedServerPortMap:
|
|
type: OS::TripleO::DeployedServer::ControlPlanePort
|
|
properties:
|
|
network: ctlplane
|
|
fixed_ips: [{subnet: {get_param: ControlPlaneSubnet}}]
|
|
name:
|
|
list_join:
|
|
- '-'
|
|
- - {get_param: name}
|
|
- ctlplane
|
|
replacement_policy: AUTO
|
|
tags:
|
|
- str_replace:
|
|
template: tripleo_stack_name=$STACK_NAME
|
|
params:
|
|
$STACK_NAME: {get_param: RootStackName}
|
|
|
|
ControlPlanePortNodePortMap:
|
|
type: OS::Heat::Value
|
|
properties:
|
|
value: {get_param: [NodePortMap, {get_param: name}, ctlplane]}
|
|
|
|
outputs:
|
|
OS::stack_id:
|
|
value: {get_resource: deployed-server}
|
|
networks:
|
|
value:
|
|
if:
|
|
- equals:
|
|
- {get_param: [NodePortMap]}
|
|
- {}
|
|
- ctlplane:
|
|
- {get_attr: [ControlPlanePortDeployedServerPortMap, fixed_ips, 0, ip_address]}
|
|
- ctlplane:
|
|
- {get_attr: [ControlPlanePortNodePortMap, value, ip_address]}
|
|
addresses:
|
|
value:
|
|
if:
|
|
- equals:
|
|
- {get_param: [NodePortMap]}
|
|
- {}
|
|
- ctlplane:
|
|
- {get_attr: [ControlPlanePortDeployedServerPortMap, fixed_ips, 0, ip_address]}
|
|
- ctlplane:
|
|
- subnets:
|
|
- cidr: {get_attr: [ControlPlanePortNodePortMap, value, ip_subnet]}
|
|
name:
|
|
value: {get_param: name}
|