ansible/test/integration/targets/connection_psrp/runme.sh
Matt Clay 92380d7050
Update ansible-test --windows inventory creation. (#60911)
Host specific settings are created as part of the generated inventory instead of using a host_vars directory.

Also update connection tests to work properly with the generated inventory changes.
2019-08-20 07:17:32 -07:00

24 lines
615 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
# 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" \
"$@"
python.py -m pip install pypsrp
cd ../connection
INVENTORY="${OUTPUT_DIR}/test_connection.inventory" ./test.sh \
-e target_hosts=windows \
-e action_prefix=win_ \
-e local_tmp=/tmp/ansible-local \
-e remote_tmp=c:/windows/temp/ansible-remote \
"$@"
cd ../connection_psrp
ansible-playbook -i "${OUTPUT_DIR}/test_connection.inventory" tests.yml \
"$@"