[Clound-init ] Not possible to set hostname to FQDN or shortname via userdata

Solution Verified - Updated -

Issue

According to documentation it should be possible to use module set_hostnamebut it seems hostname key in the userdata is completelly ignored and only local-hostname in metadata is properly resolved.
Upstream version of cloud-init has option prefer_fqdn_over_hostname which seems to fix this problem, is it available in the RHEL ?

Environment

  • Red Hat Enterprise Linux 8.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content