Revert "Revert "Blacklist support for ExtraConfig""
[apex-tripleo-heat-templates.git] / extraconfig / pre_network / host_config_and_reboot.yaml
index 009a087..6c46133 100644 (file)
@@ -95,6 +95,13 @@ parameters:
     default: "vfio-pci"
     description: DPDK Driver type
     type: string
+  deployment_actions:
+    default: ['CREATE', 'UPDATE']
+    type: comma_delimited_list
+    description: >
+      List of stack actions that will trigger any deployments in this
+      templates. The actions will be an empty list of the server is in the
+      toplevel DeploymentServerBlacklist parameter's value.
 
 conditions:
   is_host_config_required: {not: {equals: [{get_param: [RoleParameters, KernelArgs]}, ""]}}
@@ -117,6 +124,10 @@ conditions:
   socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']}
   driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']}
   isol_cpus_empty: {equals: [{get_param: IsolCpusList}, '0']}
+  deployment_actions_empty:
+    equals:
+      - {get_param: deployment_actions}
+      - []
 
 resources:
   RoleParametersValue:
@@ -162,7 +173,11 @@ resources:
       name: HostParametersDeployment
       server:  {get_param: server}
       config: {get_resource: HostParametersConfig}
-      actions: ['CREATE'] # Only do this on CREATE
+      actions:
+        if:
+          - deployment_actions_empty
+          - []
+          - ['CREATE'] # Only do this on CREATE
       input_values:
         _KERNEL_ARGS_: {get_param: [RoleParameters, KernelArgs]}
         _TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
@@ -224,7 +239,11 @@ resources:
       name: RebootDeployment
       server:  {get_param: server}
       config: {get_resource: RebootConfig}
-      actions: ['CREATE'] # Only do this on CREATE
+      actions:
+        if:
+          - deployment_actions_empty
+          - []
+          - ['CREATE'] # Only do this on CREATE
       signal_transport: NO_SIGNAL
 
 outputs: