Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / extraconfig / pre_network / config_then_reboot.yaml
1 heat_template_version: pike
2
3 description: >
4   Do some configuration, then reboot - sometimes needed for early-boot
5   changes such as modifying kernel configuration
6
7 parameters:
8   server:
9     type: string
10
11 resources:
12
13   SomeConfig:
14     type: OS::Heat::SoftwareConfig
15     properties:
16       group: script
17       config: |
18         #!/bin/bash
19         echo "did some config before reboot" > /root/pre-reboot-config
20
21   SomeDeployment:
22     type: OS::Heat::SoftwareDeployment
23     properties:
24       name: SomeDeployment
25       server:  {get_param: server}
26       config: {get_resource: SomeConfig}
27       actions: ['CREATE'] # Only do this on CREATE
28
29   RebootConfig:
30     type: OS::Heat::SoftwareConfig
31     properties:
32       group: script
33       config: |
34         #!/bin/bash
35         # Stop os-collect-config to avoid any race collecting another
36         # deployment before reboot happens
37         systemctl stop os-collect-config.service
38         /sbin/reboot
39
40   RebootDeployment:
41     type: OS::Heat::SoftwareDeployment
42     depends_on: SomeDeployment
43     properties:
44       name: RebootDeployment
45       server:  {get_param: server}
46       config: {get_resource: RebootConfig}
47       actions: ['CREATE'] # Only do this on CREATE
48       signal_transport: NO_SIGNAL