Commit bb0bf9ee by Michael DeHaan

Only override the pattern if it is ommitted

parent 9df612f0
...@@ -503,7 +503,7 @@ class PlayBook(object): ...@@ -503,7 +503,7 @@ class PlayBook(object):
# get configuration information about the pattern # get configuration information about the pattern
pattern = pg.get('hosts',None) pattern = pg.get('hosts',None)
if self.override_hosts: if self.override_hosts and not pattern:
pattern = 'all' pattern = 'all'
if pattern is None: if pattern is None:
raise errors.AnsibleError('hosts declaration is required') raise errors.AnsibleError('hosts declaration is required')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment