From bb0bf9eef42d8f00447c74b4453e810a2dbe34f3 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 24 Mar 2012 16:20:47 -0400 Subject: [PATCH] Only override the pattern if it is ommitted --- lib/ansible/playbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook.py b/lib/ansible/playbook.py index 8197ba6a9e1..27595d03760 100755 --- a/lib/ansible/playbook.py +++ b/lib/ansible/playbook.py @@ -503,7 +503,7 @@ class PlayBook(object): # get configuration information about the pattern pattern = pg.get('hosts',None) - if self.override_hosts: + if self.override_hosts and not pattern: pattern = 'all' if pattern is None: raise errors.AnsibleError('hosts declaration is required')