You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/network_cli/runme.sh

20 lines
552 B
Bash

#!/usr/bin/env bash
set -ux # no -e because we want to run teardown no matter waht
export ANSIBLE_ROLES_PATH=../
ansible-playbook setup.yml -i "$INVENTORY_PATH" "$@"
# We need a nonempty file to override key with (empty file gives a
# lovely "list index out of range" error)
foo=$(mktemp)
echo hello > "$foo"
ansible-playbook \
-i "$INVENTORY_PATH" \
-e ansible_user=atester \
-e ansible_password=testymctest \
-e ansible_ssh_private_key_file="$foo" \
passworded_user.yml
ansible-playbook teardown.yml -i "$INVENTORY_PATH" "$@"