← Back to team overview

cloud-init team mailing list archive

How to use user scripts?


Hi all,

I've been using cloud-init for a while now with great success, I automate a
lot of things at first boot--even more things than I think I should,
actually :)

When I need to run commands, I just use the cc_runcmd module. I like,
however, to use the most appropriate module for a certain task (i.e., I
don't copy SSH key pairs with cc_runcmd, I use the ssh_authorized_keys from
the cc_users_groups module, and so on). In the documentation, I read about
the cc_scripts_user module, and I'd like to use it, but don't have a clue
on how. How would an user-data file look like using this module? Also, do I
need to include additional files (the shell scripts) when creating seed.iso
with genisoimage?

cc_runcmd is really simple, I just declare every command as a YAML list
item, but there are no examples in the docs for cc_scripts_user.


I'm using the NoCloud datasource.

Any help with this would be much appreciated!

Best regards,
Eduardo Santos