Fixed yaml for cloud config chpasswd

It's adding a \n into the password when set. Using |- will trim the last
\n and prevent it from being added to the actual password.

In the user data we see:
{
  "ssh_pwauth": true,
  "disable_root": false,
  "chpasswd": {
    "list": "root:password\\n",
    "expire": false
  },
  ...SNIP...
}

So the password ends up being set as "password\n" instead of "password"

Change-Id: I1f28b12d8793db33e2653b739318d36a503633f5
This commit is contained in:
Alex Schultz 2021-06-09 08:38:22 -06:00
parent 25c4b89652
commit f94d725451
1 changed files with 2 additions and 2 deletions

View File

@ -414,7 +414,7 @@ Allow root ssh login (for development environments only):
ssh_pwauth: true
disable_root: false
chpasswd:
list: |
list: |-
root:sekrit password
expire: False
@ -598,4 +598,4 @@ the ``--all`` argument::
.. _cloud-config: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
.. _instance-data: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html
.. _instance-data: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html