From 621b0527774dad4253144a1bfb37aa404f5608f5 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 30 Jan 2019 19:13:19 -0500 Subject: [PATCH] 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) --- lib/ansible/inventory/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/manager.py b/lib/ansible/inventory/manager.py index 9d96bf76f9..7876786c39 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