diff --git a/lib/ansible/inventory/manager.py b/lib/ansible/inventory/manager.py index 9d96bf76f90..7876786c39a 100644 --- a/lib/ansible/inventory/manager.py +++ b/lib/ansible/inventory/manager.py @@ -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