2016-09-23 13:49 GMT+02:00 Michal Skrivanek <michal.skrivanek@redhat.com>:

it should be plaintext
did you want to configure root or some other user?

As some other user. And after fiddling a while (thanks for the cdrom tip!), I discovered that the password setting works only with the root user. As a proof, here it is the user_data created with a "centos" user, password "centos" specified:

#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
timezone: Europe/Warsaw
ssh_pwauth: true
chpasswd:
  expire: false
user: centos
package_upgrade: true

and here it is the same file setting a password "centos" for the user root:

#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
password: centos
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
timezone: Europe/Warsaw
ssh_pwauth: true
chpasswd:
  expire: false
user: root


Maybe I didn't discover anything new but I wasn't able to find any documentation about this before.