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

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