[11:55] <Deckard111> hey everyone ;)
[11:56] <Deckard111> quick question: In which order is the yamol configuration executed? would it be possible to have several 'users' sections? 
[11:57] <Deckard111> I would like to create a user and write a file into the user directory.
[11:57] <Deckard111> But I have other files I need to write before that
[11:57] <Deckard111> so if I write the files first, the user directory is not there, and if I create the user first, then other files are missing.
[11:58] <Deckard111> That's why I am asking ;)
[12:05] <aciba> Deckard111: Hello!
[12:07] <aciba> Not sure about the use case but, there are two module that could serve as a pre-hook and post-hook repectively: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#bootcmd and https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd. More info: https://cloudinit.readthedocs.io/en/latest/topics/boot.html
[12:08] <aciba> So you could execute arbitrary code with cc_bootcmd before cc_users_groups and with cc_run_cmd after after cc_user_groups is executed, allowing you to do any additional handling needed
[12:10] <Deckard111> ok, thank you - will look into it
[12:41] <minimal> Deckard111: you can only have a single "users:" section and all users will created at the same time
[12:42] <minimal> the order that c-i modules are defined in the /etc/cloud/cloud.cfg file controls the order that they are executed but I would not recommend changing the order
[12:43] <minimal> what files do you need to create before users creation?
[12:46] <minimal> Deckard111: write_files runs before user creation but you can also specify "defer: true" in a write_files section for it to instead run late in the configuration sequence
[19:02] <Deckard111> Thank you everyone for the responses!