1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

make missing pattern ansibleerror (#51397)

ansibleoptionserror should be limited to cli options
 (technically --limit makes this a bit grey but hosts: should not trigger the same error)
This commit is contained in:
Brian Coca 2019-01-30 19:13:19 -05:00 committed by GitHub
parent dd2032a3ad
commit 621b052777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -558,7 +558,7 @@ class InventoryManager(object):
if C.HOST_PATTERN_MISMATCH == 'warning':
display.warning(msg)
elif C.HOST_PATTERN_MISMATCH == 'error':
raise AnsibleOptionsError(msg)
raise AnsibleError(msg)
# no need to write 'ignore' state
return results