63dd5a9c66c465d0748fa342157e647311cf7363
[apex-tripleo-heat-templates.git] / firstboot / userdata_root_password.yaml
1 heat_template_version: ocata
2
3 description: >
4   Uses cloud-init to enable root logins and set the root password.
5   Note this is less secure than the default configuration and may not be
6   appropriate for production environments, it's intended for illustration
7   and development/debugging only.
8
9 parameters:
10   NodeRootPassword:
11     description: Root password for the nodes
12     hidden: true
13     type: string
14
15 resources:
16   userdata:
17     type: OS::Heat::MultipartMime
18     properties:
19       parts:
20       - config: {get_resource: root_config}
21
22   root_config:
23     type: OS::Heat::CloudConfig
24     properties:
25       cloud_config:
26         ssh_pwauth: true
27         disable_root: false
28         chpasswd:
29           list:
30             str_replace:
31               template: "root:PASSWORD"
32               params:
33                 PASSWORD: {get_param: NodeRootPassword}
34           expire: False
35
36 outputs:
37   OS::stack_id:
38     value: {get_resource: userdata}