Skip to content

Commit

Permalink
images/alt: Disable update_hostname cloud-init module (#344)
Browse files Browse the repository at this point in the history
Disable `update_hostname` module in cloud-init to prevent errors on
reboot.

Passing build:
https://github.com/MusicDin/lxd-ci/actions/runs/11682041046
  • Loading branch information
simondeziel authored Nov 5, 2024
2 parents 2c3c5db + 6a1fb06 commit 5de821e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions images/alt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,17 @@ actions:
variants:
- cloud

# XXX: Prevent cloud-init from attempting to modify the hostname. Otherwise, cloud-init fails with
# an attribute error: "module 'cloudinit.util' has no attribute 'load_file'") in "update_hostname".
- trigger: post-packages
action: |-
#!/bin/sh
set -eux
# Disable the update_hostname module in cloud-init.
sed -i '/update_hostname/d' /etc/cloud/cloud.cfg
variants:
- cloud

mappings:
architecture_map: altlinux

0 comments on commit 5de821e

Please sign in to comment.