19 lines
415 B
Bash
Executable File
19 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
|
|
RUN_DATE=`date`
|
|
|
|
BASE_URL="tower2.thezengarden.net"
|
|
AAP_INVENTORY=8
|
|
POST_PAYLOAD_PATH="post.add_host"
|
|
POST_PAYLOAD_TYPE="application/json"
|
|
|
|
TOWER_TOKEN="jQwHURhs9fNNyombPLEAK8a2vRmmBQ"
|
|
|
|
curl -k -H "Authorization: Bearer ${TOWER_TOKEN}" \
|
|
-H "Content-type: ${POST_PAYLOAD_TYPE}" \
|
|
-X POST \
|
|
-d @"${POST_PAYLOAD_PATH}" \
|
|
"https://${BASE_URL}/api/v2/inventories/${AAP_INVENTORY}/hosts/"
|
|
|
|
|