-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hosts: [] is matching 'all' hosts #37894
Comments
@miramar-labs the |
I created a new ans24 venv, replaced manager.py with the raw from above (f0dfbba) and re-ran the test .. same thing... |
hosts file: [nodes] [masters] [workers] [dns] [vip] [collector] |
test.yml:
|
result: PLAY RECAP ********************************************************************* |
I may not be testing this correctly ... but i thought that replacing manager.py under site-packages/ansible/inventory should do it ... ? |
This is what i get when i run the same with the patch:
without the patch:
|
fixes ansible#37894 (cherry picked from commit 2e852fc)
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/filters/mathstuff.py
Set Theory Filters - difference()
ANSIBLE VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
this expression:
does not produce an empty set if there is only one item in the masters group.
for >1 items in the group, it works as expected.
STEPS TO REPRODUCE
EXPECTED RESULTS
that the play does not iterate over any hosts, as I think difference() in this case should prodce an empty set.
ACTUAL RESULTS
play iterates over ALL of the hosts:
PLAY RECAP *********************************************************************
k8s.foo.com : ok=1 changed=0 unreachable=0 failed=0
master1.foo.com : ok=1 changed=0 unreachable=0 failed=0
ns1.foo.com : ok=1 changed=0 unreachable=0 failed=0
worker1.foo.com : ok=1 changed=0 unreachable=0 failed=0
The text was updated successfully, but these errors were encountered: