mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-05 02:03:09 +00:00
hosts can be list or string
This commit is contained in:
@@ -106,7 +106,10 @@ class Play(Base, Taggable, Become):
|
||||
@staticmethod
|
||||
def load(data, variable_manager=None, loader=None):
|
||||
if ('name' not in data or data['name'] is None) and 'hosts' in data:
|
||||
data['name'] = data['hosts']
|
||||
if isinstance(data['hosts'], list):
|
||||
data['name'] = ','.join(data['hosts'])
|
||||
else:
|
||||
data['name'] = data['hosts']
|
||||
p = Play()
|
||||
return p.load_data(data, variable_manager=variable_manager, loader=loader)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user