2018-11-19 17:45:45 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# ignore empty env var and use default
|
|
|
|
# shellcheck disable=SC1007
|
2019-01-25 04:25:06 +01:00
|
|
|
ANSIBLE_TIMEOUT= ansible -m ping testhost -i ../../inventory "$@"
|
2018-11-19 17:45:45 +01:00
|
|
|
|
|
|
|
# env var is wrong type, this should be a fatal error pointing at the setting
|
2019-01-25 04:25:06 +01:00
|
|
|
ANSIBLE_TIMEOUT='lola' ansible -m ping testhost -i ../../inventory "$@" 2>&1|grep 'Invalid type for configuration option setting: DEFAULT_TIMEOUT'
|
2020-07-20 18:25:29 +02:00
|
|
|
|
2020-11-03 00:00:17 +01:00
|
|
|
# https://github.com/ansible/ansible/issues/69577
|
|
|
|
ANSIBLE_REMOTE_TMP="$HOME/.ansible/directory_with_no_space" ansible -m ping testhost -i ../../inventory "$@"
|
|
|
|
|
|
|
|
ANSIBLE_REMOTE_TMP="$HOME/.ansible/directory with space" ansible -m ping testhost -i ../../inventory "$@"
|
|
|
|
|
|
|
|
ANSIBLE_CONFIG=nonexistent.cfg ansible-config dump --only-changed -v | grep 'No config file found; using defaults'
|
2021-02-25 18:03:03 +01:00
|
|
|
|
|
|
|
# https://github.com/ansible/ansible/pull/73715
|
|
|
|
ANSIBLE_CONFIG=inline_comment_ansible.cfg ansible-config dump --only-changed | grep "'ansibull'"
|
2021-04-15 21:07:43 +02:00
|
|
|
|
|
|
|
# test the config option validation
|
|
|
|
ansible-playbook validation.yml "$@"
|