Skip to content

Commit

Permalink
docs: add create_hostname_file key to module reference examples
Browse files Browse the repository at this point in the history
  • Loading branch information
catmsred committed Jan 3, 2024
1 parent 0e3d02a commit b136c51
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cloudinit/config/cc_set_hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,19 @@
dedent(
"""\
hostname: myhost
ceate_hostname_file: true
fqdn: myhost.example.com
prefer_fqdn_over_hostname: true
"""
),
dedent(
"""\
# On a machine without an ``/etc/hostname`` file, don't create it
# In most clouds, this will results in a DHCP configured hostname
# provided by the cloud
create_hostname_file: false
"""
),
],
"activate_by_schema_keys": [],
}
Expand Down
9 changes: 9 additions & 0 deletions cloudinit/config/cc_update_hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
fqdn: external.fqdn.me
hostname: myhost
prefer_fqdn_over_hostname: true
create_hostname_file: true
"""
),
dedent(
Expand All @@ -74,6 +75,14 @@
prefer_fqdn_over_hostname: false
"""
),
dedent(
"""\
# On a machine without an ``/etc/hostname`` file, don't create it
# In most clouds, this will results in a DHCP configured hostname
# provided by the cloud
create_hostname_file: false
"""
),
],
"frequency": PER_ALWAYS,
"activate_by_schema_keys": [],
Expand Down

0 comments on commit b136c51

Please sign in to comment.