summaryrefslogtreecommitdiffstats
path: root/firstboot/userdata_root_password.yaml
blob: d32f223bce85218a25469a44a553f0447675b01c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
heat_template_version: pike

description: >
  Uses cloud-init to enable root logins and set the root password.
  Note this is less secure than the default configuration and may not be
  appropriate for production environments, it's intended for illustration
  and development/debugging only.

parameters:
  NodeRootPassword:
    description: Root password for the nodes
    hidden: true
    type: string

resources:
  userdata:
    type: OS::Heat::MultipartMime
    properties:
      parts:
      - config: {get_resource: root_config}

  root_config:
    type: OS::Heat::CloudConfig
    properties:
      cloud_config:
        ssh_pwauth: true
        disable_root: false
        chpasswd:
          list:
            str_replace:
              template: "root:PASSWORD"
              params:
                PASSWORD: {get_param: NodeRootPassword}
          expire: False

outputs:
  OS::stack_id:
    value: {get_resource: userdata}