Merge "Replace outdated instruction with link to upstream doc"
[apex-tripleo-heat-templates.git] / extraconfig / pre_network / config_then_reboot.yaml
index bb0b951..79cb7cb 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
 
 description: >
   Do some configuration, then reboot - sometimes needed for early-boot
@@ -7,6 +7,19 @@ description: >
 parameters:
   server:
     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:
+  deployment_actions_empty:
+    equals:
+      - {get_param: deployment_actions}
+      - []
 
 resources:
 
@@ -24,6 +37,11 @@ resources:
       name: SomeDeployment
       server:  {get_param: server}
       config: {get_resource: SomeConfig}
+      actions:
+        if:
+          - deployment_actions_empty
+          - []
+          - ['CREATE'] # Only do this on CREATE
       actions: ['CREATE'] # Only do this on CREATE
 
   RebootConfig:
@@ -44,5 +62,9 @@ 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