/srv/irclogs.ubuntu.com/2020/04/21/#cloud-init.txt

=== tds1 is now known as tds
=== tds1 is now known as tds
caribouHello everyone, before filing a bug on this, I'd like your opinion : when setting *disable_root: false*, shouldn't *disable_root_opts08:47
cariboube disabled as well ?08:47
caribouas if one wants root login enabled, then disable_root_opts should not fill /root/.ssh/authorized_keys with blocking options08:48
caribouI'd be happy to submit a patch for this08:49
meenacaribou: generally, disable_root disables password login for root, not the entire account. that means that you deffo want ssh keys09:35
caribouah, right fine then09:43
caribouthanks for the precision09:44
Odd_Blokecaribou: There's actually a recently-filed bug for that, let me see if I can find it.13:35
Odd_Blokecaribou: Does https://bugs.launchpad.net/cloud-init/+bug/1871879 look like what you're asking for?13:36
ubot5Ubuntu bug 1871879 in cloud-init "Configuring a user should not configure root's authorized_keys" [Wishlist,Triaged]13:36
Odd_BlokeOh, no, I think that's actually the opposite of what you're asking, my mistake.13:36
Odd_Bloke(It's too early for me to process the double negative of "disable_root: false". ;)13:37
Odd_BlokeSo https://cloudinit.readthedocs.io/en/latest/topics/modules.html#authorized-keys is the documentation we have for the option, and it's not particularly clear IMO.13:38
Odd_Blokecaribou: And, actually, reading the code, I believe that `disable_root: false` should lead to `disable_root_opts` being ignored.13:40
caribou@Odd_Bloke actually, with meena's precision, I don't even need to use disable_root13:40
caribouyeah, that's what I meant, just move the opt inside the 'if'13:41
cariboubut if disable_root is only for disabling pwd login, then it may still be usefull to have that entry in authorized_keys13:41
Odd_Blokecaribou: I've just set up a cloud-config with an `authorized_keys:` section and `disable_root: false` and it works as I would expect (disable_root_opts is not applied).  If that isn't what you're seeing, could you file a bug please?13:44
caribousure, will check htat13:45
caribouthanks for looking it up13:45
punkgeekhow can i import a shell script to vm by cloud init?17:29
Odd_Blokepunkgeek: Could you explain what you mean by that?  If you want cloud-init to execute a shell script, you can either specify the script as your entire user-data (with an appropriate shebang) or use the runcmd cloud-config option: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd.  If you want to write a shell script, then you probably want to take a look at17:30
Odd_Blokehttps://cloudinit.readthedocs.io/en/latest/topics/modules.html#write-files.17:30
Odd_Bloke(If you want something else, let us know. :)17:30
punkgeekThank you that was what i want17:32
Odd_BlokeGreat! :)17:33
blackboxswat long last paride https://github.com/canonical/cloud-init/pull/231#pullrequestreview-39763692620:33
blackboxswGoneri thanks for the review updates on your PRs, grabbing that today and hopefully we can close out there20:36
GoneriYeah!20:42

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