2018-08-22 01:43:13 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
2019-08-20 16:17:32 +02:00
|
|
|
# make sure hosts are using psrp connections
|
|
|
|
ansible -i ../../inventory.winrm localhost \
|
|
|
|
-m template \
|
|
|
|
-a "src=test_connection.inventory.j2 dest=${OUTPUT_DIR}/test_connection.inventory" \
|
|
|
|
"$@"
|
|
|
|
|
2018-10-23 21:37:05 +02:00
|
|
|
python.py -m pip install pypsrp
|
2018-08-22 01:43:13 +02:00
|
|
|
cd ../connection
|
|
|
|
|
2019-08-20 16:17:32 +02:00
|
|
|
INVENTORY="${OUTPUT_DIR}/test_connection.inventory" ./test.sh \
|
|
|
|
-e target_hosts=windows \
|
2018-08-22 01:43:13 +02:00
|
|
|
-e action_prefix=win_ \
|
|
|
|
-e local_tmp=/tmp/ansible-local \
|
|
|
|
-e remote_tmp=c:/windows/temp/ansible-remote \
|
2018-10-23 21:37:05 +02:00
|
|
|
"$@"
|
|
|
|
|
|
|
|
cd ../connection_psrp
|
|
|
|
|
2019-08-20 16:17:32 +02:00
|
|
|
ansible-playbook -i "${OUTPUT_DIR}/test_connection.inventory" tests.yml \
|
2018-08-22 01:43:13 +02:00
|
|
|
"$@"
|