Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created March 1, 2012 04:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohadlevy/1947339 to your computer and use it in GitHub Desktop.
Save ohadlevy/1947339 to your computer and use it in GitHub Desktop.
#! /bin/sh
#
USER="admin"
PASS="changeme"
FOREMAN_URL="https://foreman"
FQDN=$1
CHANGED_ATTRIBUTE="host[environment_id]=2"
curl -H "Accept:application/json" -X PUT \
-k -u $USER:$PASS \
-d $CHANGED_ATTRIBUTE \
$FOREMAN_URL/hosts/$FQDN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment