Pacemaker HA suport for OVN DB servers
[apex-tripleo-heat-templates.git] / puppet / role.role.j2.yaml
index dbb517f..7af90e2 100644 (file)
@@ -154,6 +154,20 @@ parameters:
       major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
       environment files.
     default: ''
+  DeploymentServerBlacklistDict:
+    default: {}
+    type: json
+    description: >
+      Map of server hostnames to blacklist from any triggered
+      deployments. If the value is 1, the server will be blacklisted. This
+      parameter is generated from the parent template.
+
+conditions:
+  server_not_blacklisted:
+    not:
+      equals:
+        - {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
+        - 1
 
 resources:
   {{role}}:
@@ -392,6 +406,11 @@ resources:
       input_values:
         bridge_name: br-ex
         interface_name: {get_param: NeutronPublicInterface}
+      actions:
+        if:
+          - server_not_blacklisted
+          - {get_param: NetworkDeploymentActions}
+          - []
 
   {{role}}UpgradeInitConfig:
     type: OS::Heat::SoftwareConfig
@@ -414,6 +433,11 @@ resources:
       name: {{role}}UpgradeInitDeployment
       server: {get_resource: {{role}}}
       config: {get_resource: {{role}}UpgradeInitConfig}
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
 
   {{role}}Deployment:
     type: OS::Heat::StructuredDeployment
@@ -424,6 +448,11 @@ resources:
       server: {get_resource: {{role}}}
       input_values:
         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
 
   {{role}}Config:
     type: OS::Heat::StructuredConfig
@@ -433,6 +462,7 @@ resources:
         hierarchy:
           - '"%{::uuid}"'
           - heat_config_%{::deploy_config_name}
+          - config_step
           - {{role.lower()}}_extraconfig
           - extraconfig
           - service_names
@@ -499,6 +529,11 @@ resources:
       input_values:
         update_identifier:
           get_param: UpdateIdentifier
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
 
   SshHostPubKey:
     type: OS::TripleO::Ssh::HostPubKey
@@ -588,6 +623,7 @@ CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY"
     description: Heat resource handle for {{role}} server
     value:
       {get_resource: {{role}}}
+    condition: server_not_blacklisted
   external_ip_address:
     description: IP address of the server in the external network
     value: {get_attr: [ExternalPort, ip_address]}