summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/connection_winrm/runme.sh
blob: 36a7aa8586b3129f5da9483bd2213f7dd2e720b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

set -eux

# make sure hosts are using winrm connections
ansible -i ../../inventory.winrm localhost \
    -m template \
    -a "src=test_connection.inventory.j2 dest=${OUTPUT_DIR}/test_connection.inventory" \
    "$@"

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_winrm

ansible-playbook -i "${OUTPUT_DIR}/test_connection.inventory" tests.yml \
    "$@"