tripleo-heat-templates/firstboot/userdata_root_password.yaml
ramishra c9991c2e31 Use 'wallaby' heat_template_version
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added
a new template version for wallaby. This would allow us to use
2-argument variant of the ``if`` function that would allow for
 e.g. conditional definition of resource properties and help
cleanup templates. If only two arguments are passed to ``if``
function, the entire enclosing item is removed when the condition
is false.

Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
2021-03-31 17:35:12 +05:30

39 lines
938 B
YAML

heat_template_version: wallaby
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}