ansible-modules-matrix/test-login-logout.sh

12 lines
393 B
Bash
Raw Normal View History

#!/bin/bash
source test-settings.sh
login_resp=` echo "{\"ANSIBLE_MODULE_ARGS\": {\"hs_url\": \"${HS_URL}\",\"user_id\": \"${USER_ID}\",\"password\": \"${PASSWORD}\"}}" | python matrix-login.py`
echo $login_resp
local_token=`echo $login_resp | jq --raw-output '.token'`
echo "{\"ANSIBLE_MODULE_ARGS\": {\"hs_url\": \"${HS_URL}\",\"token\": \"${local_token}\"}}" | python matrix-logout.py