mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* Restore behavior for detecting only localhost, and no limit match. Fixes #52152 * Add test for non-matching limit
This commit is contained in:
1
test/integration/targets/inventory/aliases
Normal file
1
test/integration/targets/inventory/aliases
Normal file
@@ -0,0 +1 @@
|
||||
shippable/posix/group3
|
||||
4
test/integration/targets/inventory/playbook.yml
Normal file
4
test/integration/targets/inventory/playbook.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- ping:
|
||||
11
test/integration/targets/inventory/runme.sh
Executable file
11
test/integration/targets/inventory/runme.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
# https://github.com/ansible/ansible/issues/52152
|
||||
# Ensure that non-matching limit causes failure with rc 1
|
||||
ansible-playbook -i ../../inventory --limit foo playbook.yml
|
||||
if [ "$?" != "1" ]; then
|
||||
echo "Non-matching limit should cause failure"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user