gattytto | hello all! thanks for cloudinit it's great | 00:47 |
---|---|---|
gattytto | I am looking for a way to generate vm names on the fly with cloudinit using random words like LXC does, it's a very useful feature | 00:48 |
minimal | gattytto: hostnames you mean? that's controlled by the relevant meta-data / user-data | 00:51 |
gattytto | yes hostnames but I'd like a "RANDOM" feature like for passwords that generates random hostnames too | 00:52 |
minimal | gattytto: you could write a patch for cc_set_hostname module to do that | 00:53 |
minimal | but that would only work where that module is being used (i.e. DataSource dependant) | 00:53 |
minimal | some DataSources provide hostname via metadata server | 00:54 |
gattytto | yeah I have some usecase like WHMCS web panel that does | 00:54 |
gattytto | but in case it doesn't I know at least I'm getting os image default so I can check | 00:54 |
gattytto | I wanted to know if there was already some module around it as I see there are other modules super useful I'm using | 00:55 |
minimal | it is typically coming from either meta-data or user-data, not OS default | 00:57 |
blackboxsw | gattytto: there is a utility `petname` that could generate that random name for you. You could install that package and invoke it in runcmd setting the hostname to that return value. If you want a bunch of random characters in your hostname, #cloud-config user-data could do that with jinja templates and you might be able to use something like the {%- for i in range(8) %}{{ 'abcdefghijklmnopqrstuvwxyz' | random }}{% endfor %} | 05:20 |
kags2100 | Question, my plan is to deploy a base template using the User-Data file. Then after run cloud-init clean, from that template I can then provision new VMs that are then setup for their specific purpose, like Docker Server, etc. Is this a good idea? | 10:38 |
Kags141 | Question, my plan is to deploy a base template using the User-Data file. Then after run cloud-init clean, from that template I can then provision new VMs that are then setup for their specific purpose, like Docker Server, etc. Is this a good idea? | 11:03 |
gattytto | blackboxsw thank you I will try the pet name=) | 14:58 |
beantaxi | falcojr: Thank you so much for merging in my PR! You noted it was missing some docs changes you'd requested + sent a patch for, and I just found that I'd applied that patch to main by mistake | 19:39 |
beantaxi | I can bang out a new PR for that change no problem | 19:40 |
beantaxi | Update: I just created #1264 to make the docs change. If you've already made the change or would prefer a different approach, no worries | 19:58 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!