Skip to content

Instantly share code, notes, and snippets.

@sthirugn
Last active November 17, 2016 15:53
Show Gist options
  • Save sthirugn/4d5da4b35cab8d6024018f447fde8c93 to your computer and use it in GitHub Desktop.
Save sthirugn/4d5da4b35cab8d6024018f447fde8c93 to your computer and use it in GitHub Desktop.
set -vx
hammer -u admin -p changeme host list --page 1 --per-page 20 | awk '/^[0-9].*/{print $1}' > test.out
while read hostid; do
hammer -u admin -p changeme host package install --host-id $hostid --packages satellite-tools-upgrade;
done <test.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment