What a cloud-config file is
Cloud-init is the program almost every Linux cloud image runs on its very first boot. It reads the user data your provider passes in and applies it before you ever log in. A user-data file that begins with the line #cloud-config is treated as YAML instructions rather than as a shell script, which is what this tool produces.
Keys are written in the order cloud-init applies them, so the file reads in the same sequence the machine executes.
-
hostname,fqdn,preserve_hostname,timezone, andlocale -
userswithlock_passwd, shell, groups, sudo rule, andssh_authorized_keys -
disable_rootandssh_pwauth, always written explicitly -
package_update,package_upgrade, and apackageslist -
write_fileswith path, permissions, owner, and block-scalar content -
runcmdfor firewall rules and your own first-boot commands - An optional
power_statereboot once everything has finished