mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Only override the pattern if it is ommitted
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user