Skip to content

Instantly share code, notes, and snippets.

@ianballou
Created October 30, 2024 15:31
Show Gist options
  • Save ianballou/c888991038fa2d941abcd9ac9ff4e86f to your computer and use it in GitHub Desktop.
Save ianballou/c888991038fa2d941abcd9ac9ff4e86f to your computer and use it in GitHub Desktop.
"Clone" a Foreman host for testing
uuid=$(uuidgen)
short=$(hostname -s)
domain=YOUR.DOMAIN
echo "{\"dmi.system.uuid\": \"${uuid}\"}" > /etc/rhsm/facts/uuid.facts
hostnamectl set-hostname ${short}.${uuid%%-*}.${domain}
subscription-manager clean
subscription-manager register --activationkey YOUR_AK --org YOUR_ORG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment