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)
pull/51527/head
Brian Coca 6 years ago committed by GitHub
parent dd2032a3ad
commit 621b052777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save