Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / firstboot / userdata_dev_rsync.yaml
1 heat_template_version: ocata
2
3 description: >
4   This is first boot configuration for development purposes. It allows
5   overriding contents of the deployed images via rsync before
6   configuration (e.g. Puppet) starts, speeding up the feedback loop
7   between making a change and seeing it applied.
8
9   To prepare the host, put something like this to /etc/rsyncd.conf:
10
11       [overcloudsync]
12             path = /root/overcloudsync
13             comment = overcloud pre-puppet customizations
14
15   Then run `rsync --daemon`.
16
17 parameters:
18   dev_rsync_host:
19     type: string
20     default: 192.168.122.1
21     description: Host to sync contents from via rsync
22   dev_rsync_module:
23     type: string
24     default: overcloudsync
25     description: Name of the module defined in rsyncd.conf on rsync_host
26
27 resources:
28   userdata:
29     type: OS::Heat::MultipartMime
30     properties:
31       parts:
32       - config: {get_resource: rsync_config}
33         subtype: 'x-shellscript'
34
35   rsync_config:
36     type: OS::Heat::SoftwareConfig
37     properties:
38       config:
39         str_replace:
40           template: |
41             #!/bin/bash
42             rsync -avr rsync://RSYNC_HOST/RSYNC_MODULE /
43           params:
44             RSYNC_HOST: {get_param: dev_rsync_host}
45             RSYNC_MODULE: {get_param: dev_rsync_module}
46
47 outputs:
48   OS::stack_id:
49     value: {get_resource: userdata}