The only way to assign a hashed password to a user is to use passwd within a users entry like this:
users:
- name: root
passwd: $6$Cl....Hy$IEJciQZLxQLzkST......g.bzqf3lUl.
But, if that user is already present on the system, cloud-init will skip setting the password:
journal: [CLOUDINIT] __init__.py[INFO]: User root already exists, skipping.
You can change password with chpasswd, but that only supports clear-text password.
Requesting that chpasswd get support for setting a hashed password to users.
The only way to assign a hashed password to a user is to use passwd within a users entry like this: ..Hy$IEJciQZLxQ LzkST.. ....g.bzqf3lUl.
users:
- name: root
passwd: $6$Cl..
But, if that user is already present on the system, cloud-init will skip setting the password:
journal: [CLOUDINIT] __init__.py[INFO]: User root already exists, skipping.
You can change password with chpasswd, but that only supports clear-text password.
Requesting that chpasswd get support for setting a hashed password to users.