2017-05-01 17:52:25 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Standard ping module
|
|
|
|
ansible-playbook modules_test.yml -i ../../inventory -v "$@"
|
|
|
|
|
|
|
|
# Library path ping module
|
2019-01-17 07:34:09 +01:00
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ansible-playbook modules_test_envvar.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_no_extension ansible-playbook modules_test_envvar.yml -i ../../inventory -v "$@"
|
2017-05-01 17:52:25 +02:00
|
|
|
|
|
|
|
# ping module from role
|
2019-01-17 07:34:09 +01:00
|
|
|
ANSIBLE_ROLES_PATH=roles_with_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_ROLES_PATH=roles_no_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
2017-05-01 17:52:25 +02:00
|
|
|
|
|
|
|
# ping module from role when there's a library path module too
|
2019-01-17 07:34:09 +01:00
|
|
|
ANSIBLE_LIBRARY=lib_no_extension ANSIBLE_ROLES_PATH=roles_with_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ANSIBLE_ROLES_PATH=roles_with_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_no_extension ANSIBLE_ROLES_PATH=roles_no_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ANSIBLE_ROLES_PATH=roles_no_extension ansible-playbook modules_test_role.yml -i ../../inventory -v "$@"
|
2017-05-01 17:52:25 +02:00
|
|
|
|
|
|
|
# ping module in multiple roles: Note that this will use the first module found
|
|
|
|
# which is the current way things work but may not be the best way
|
2019-01-17 07:34:09 +01:00
|
|
|
ANSIBLE_LIBRARY=lib_no_extension ANSIBLE_ROLES_PATH=multiple_roles ansible-playbook modules_test_multiple_roles.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ANSIBLE_ROLES_PATH=multiple_roles ansible-playbook modules_test_multiple_roles.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_no_extension ANSIBLE_ROLES_PATH=multiple_roles ansible-playbook modules_test_multiple_roles.yml -i ../../inventory -v "$@"
|
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ANSIBLE_ROLES_PATH=multiple_roles ansible-playbook modules_test_multiple_roles.yml -i ../../inventory -v "$@"
|
2017-05-01 17:52:25 +02:00
|
|
|
|
|
|
|
# And prove that with multiple roles, it's the order the roles are listed in the play that matters
|
2019-01-17 07:34:09 +01:00
|
|
|
ANSIBLE_LIBRARY=lib_with_extension ANSIBLE_ROLES_PATH=multiple_roles ansible-playbook modules_test_multiple_roles_reverse_order.yml -i ../../inventory -v "$@"
|