summaryrefslogtreecommitdiff
path: root/test/integration/targets/inventory
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2019-12-12 09:09:40 +0530
committerGitHub <noreply@github.com>2019-12-12 09:09:40 +0530
commit41e19a4058bf56ad797e5c57212cd05294ff8934 (patch)
tree9f7c5d8a9cdd3f9ff58acf7a2f2134a384c8708e /test/integration/targets/inventory
parentb349ec8fcf37f5899923e949b90a23f8b27f095f (diff)
downloadansible-41e19a4058bf56ad797e5c57212cd05294ff8934.tar.gz
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides non-existing limit file. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/integration/targets/inventory')
-rwxr-xr-xtest/integration/targets/inventory/runme.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/targets/inventory/runme.sh b/test/integration/targets/inventory/runme.sh
index b6ac952a0c..3cd533cde7 100755
--- a/test/integration/targets/inventory/runme.sh
+++ b/test/integration/targets/inventory/runme.sh
@@ -21,6 +21,13 @@ if [ "$?" != "1" ]; then
exit 1
fi
+# Ensure that non-existing limit file causes failure with rc 1
+ansible-playbook -i ../../inventory --limit @foo playbook.yml
+if [ "$?" != "1" ]; then
+ echo "Non-existing limit file should cause failure"
+ exit 1
+fi
+
# Ensure that non-matching limit causes failure with rc 1
ansible-playbook -i ../../inventory --limit @"${empty_limit_file}" playbook.yml