# We need quite a few arguments now export HALF_GIG="536870912" export ONE_GIG="1073741824" export TWO_GIG="2147483648" # Some misc IDs export ORG='Default Organization' export LOCATION='Default Location' export COMPUTE_RESOURCE_ID=$(hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" --csv compute-resource list --search='name="local_libvirt"' | cut -d ',' -f 1 | grep -vi ID) # Host creation hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" host create --name='rhel-6-server-32-01' --root-pass='abracadabra' --organization="${ORG}" --location="${LOCATION}" --hostgroup="RHEL 6 Server 32-bit HG" --compute-resource-id="${COMPUTE_RESOURCE_ID}" --compute-attributes="cpus=1, memory=${HALF_GIG}, start=1" --interface="primary=true, type=network, network=foreman" --volume="capacity=10G,format_type=qcow2" hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" host create --name='rhel-6-server-64-01' --root-pass='abracadabra' --organization="${ORG}" --location="${LOCATION}" --hostgroup="RHEL 6 Server 64-bit HG" --compute-resource-id="${COMPUTE_RESOURCE_ID}" --compute-attributes="cpus=1, memory=${HALF_GIG}, start=1" --interface="primary=true, type=network, network=foreman" --volume="capacity=10G,format_type=qcow2" hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" host create --name='rhel-7-server-64-01' --root-pass='abracadabra' --organization="${ORG}" --location="${LOCATION}" --hostgroup="RHEL 7 Server 64-bit HG" --compute-resource-id="${COMPUTE_RESOURCE_ID}" --compute-attributes="cpus=1, memory=${ONE_GIG}, start=1" --interface="primary=true, type=network, network=foreman" --volume="capacity=10G,format_type=qcow2"