Only override the pattern if it is ommitted
This commit is contained in:
parent
9df612f007
commit
bb0bf9eef4
1 changed files with 1 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue