Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created September 20, 2011 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohadlevy/1229194 to your computer and use it in GitHub Desktop.
Save ohadlevy/1229194 to your computer and use it in GitHub Desktop.
#! /bin/sh
#
USER="admin"
PASS="changeme"
NAME=$1
KATELLO_HOSTGROUP="15"
curl -H "Accept:application/json" \
-k -u $USER:$PASS \
-d "host[name]=$NAME" -d "host[hostgroup_id]=$KATELLO_HOSTGROUP" \
-d "host[powerup]=1" -d "host[build]=1" \
https://foreman.sat.lab.tlv.redhat.com/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment