DB connection: prevent src address from binding to a VIP
[apex-tripleo-heat-templates.git] / deployed-server / deployed-server.yaml
index 10e934d..e4f3550 100644 (file)
@@ -49,7 +49,7 @@ resources:
   InstanceIdConfig:
     type: OS::Heat::StructuredConfig
     properties:
-      group: os-apply-config
+      group: apply-config
       config:
         instance-id: {get_resource: deployed-server}
 
@@ -67,7 +67,7 @@ resources:
           #!/bin/bash
           set -eux
           mkdir -p $heat_outputs_path
-          host=$(hostnamectl --transient)
+          host=$(hostname -s)
           echo -n $host > $heat_outputs_path.hostname
           cat $heat_outputs_path.hostname
       outputs:
@@ -80,10 +80,16 @@ resources:
       config: {get_resource: HostsEntryConfig}
       server: {get_resource: deployed-server}
 
-  ControlPlanePort:
+  ControlPlanePortImpl:
     type: OS::TripleO::DeployedServer::ControlPlanePort
     properties:
-      Hostname: {get_attr: [HostsEntryDeployment, hostname]}
+      network: ctlplane
+      name:
+        list_join:
+          - '-'
+          - - {get_attr: [HostsEntryDeployment, hostname]}
+            - ctlplane
+      replacement_policy: AUTO
 
 outputs:
   OS::stack_id:
@@ -91,6 +97,6 @@ outputs:
   networks:
     value:
       ctlplane:
-        - {get_attr: [ControlPlanePort, ip_address]}
+        - {get_attr: [ControlPlanePortImpl, fixed_ips, 0, ip_address]}
   name:
     value: {get_attr: [HostsEntryDeployment, hostname]}