Created
May 16, 2022 18:50
-
-
Save tomasbasham/38511cca82c1fd8017d882e7d75eff12 to your computer and use it in GitHub Desktop.
Revisions
-
tomasbasham created this gist
May 16, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/usr/bin/env bash set -e # Ensure the script is running as root if [[ "$(id -u)" != '0' ]]; then exec sudo "$BASH_SOURCE" "$@" fi # Update the system echo "===> Updating system" dnf upgrade -y --refresh # Check cloud-init is not already installed if ! commad -v cloud-init &> /dev/null; then echo "===> Installing cloud-init" dnf install -y cloud-init fi # Make sure cloud-init is invoked when the system next initialises. cloud-init clean echo "===> Done"