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/ansible/runme.sh

18 lines
643 B
Bash

#!/usr/bin/env bash
set -eux -o pipefail
ansible --version
ansible --help
ansible testhost -i ../../inventory -m ping "$@"
ansible testhost -i ../../inventory -m setup "$@"
ansible-config -c ./ansible-testé.cfg view | grep 'remote_user = admin'
ansible-config -c ./ansible-testé.cfg dump | grep 'DEFAULT_REMOTE_USER([^)]*) = admin\>'
ANSIBLE_REMOTE_USER=administrator ansible-config dump| grep 'DEFAULT_REMOTE_USER([^)]*) = administrator\>'
ansible-config list | grep 'DEFAULT_REMOTE_USER'
# 'view' command must fail when config file is missing
ansible-config -c ./ansible-non-existent.cfg view && exit 1 || echo 'Failure is expected'