/srv/irclogs.ubuntu.com/2021/05/05/#cloud-init.txt

=== cpaelzer__ is now known as cpaelzer
=== cpaelzer__ is now known as cpaelzer
smoserdking: user-data is not necessarily cloud-config. you need to prefix it with '#cloud-config' or cloud-init will ignore it (as if it were for something else)13:50
dkingsmoser: Thank you for getting back to me. Yes, I realized the issue yesterday. It seemed counter-intuitive to me as placing that line at the start of the file would invalidate it as JSON, but it seems that it still works like that for cloud-init. I was able to get the user_data section to work after that.14:37
dkingHowever, I did notice an issue at https://cloudinit.readthedocs.io/en/latest/topics/examples.html Is that the official documentation? I can't seem to find a more definitive source.14:39
Odd_Blokedking: That is the official documentation, yep!14:52
dkingOdd_Bloke: Is there a place where they accept suggestions or edits? It's minor, but when discussing writing files, it gives a "hello" program which should be "gz+b64", but gives the type as "gzip".15:09
smoserdking: the 'hello' is actually correct type 'gzip'15:50
smoseryaml is really stupidly complex.15:50
smoserthe '!!binary' means yaml is handling the fact that it is base64, so cloud-init would not ever even see it as base64. it gets the binary blob.15:51
smoserie, if you 'yaml.load()' that, you'll get binary content in it.15:51
dkingsmoser: Oh, okay. I didn't catch that fact as I was actually using JSON, so I didn't realize that it was base64 decoding. Thank you for pointing that out.16:12
smoserdking: there is another way other than '#cloud-config' to state that the part is cloud-config.16:16
smoserbut it requires mime or "cloud-config-archive". ... something to indicate the type.16:16
smosercloud-init will not just assume data is for it, meaning you can pass data to other programs and cloud-init wont get in the way.16:17
dkingI'm not entirely sure why that is valuable for only user_data, as opposed to meta_data or network_data, but as long as I know how it works, I should be fine.16:19
smoserthe user doesn't provide user-data or network_data. (generically)16:25
smoserthat comes from the platform16:25
smoserie, you dno't get to modify the values or format of the  aws metadata service16:25
smoserbut you do provide user-data.16:25
smoserer... above edit.  the user doesn't provide *meta*-data or network_data16:26
dkingThat's an interesting distinction. I suppose that makes some sense. Thank you for the information.16:38

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!