use of local-hostname in cloudinit #1600
Replies: 2 comments 2 replies
-
Hey @cob-web-corner Here's the reference for I think this configuration might work for you:
It’s also worth mentioning that cloud-init implementations can vary slightly between Linux distributions, so not all examples work universally, at least in my experience 🤷🏼 |
Beta Was this translation helpful? Give feedback.
-
Thanks @bpg! I'll give that a go when I have an extra minute
You're absolutely right because on my other distro cloudinit images this has been working fine, ubuntu was being used for the above question, which is humorous because the documentation is written by Canonical. |
Beta Was this translation helpful? Give feedback.
-
In this documented example, the hostname is set using a meta data configuration
local-hostname
. I cannot seem to find this documented anywhere in the cloudinit documentation.If I used the cloudinit hostname module that is document instead (see example below) the hostname will not get set. With the example code using
local-hostname
the hostname does get set properly but not the entire fqdn only the host.What's going on here?
Here's what I did instead, based on this doc, and it does not work:
In the logs I see the step/module where it goes to write the hostname but it's not catching it when using the cloudinit documented method
Beta Was this translation helpful? Give feedback.
All reactions