|
|
@ -157,28 +157,40 @@ class Play(Base, Taggable, Become):
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
try:
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
|
|
|
raise AnsibleParserError("A malformed block was encountered.", obj=self._ds)
|
|
|
|
|
|
|
|
|
|
|
|
def _load_pre_tasks(self, attr, ds):
|
|
|
|
def _load_pre_tasks(self, attr, ds):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
try:
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
|
|
|
raise AnsibleParserError("A malformed block was encountered.", obj=self._ds)
|
|
|
|
|
|
|
|
|
|
|
|
def _load_post_tasks(self, attr, ds):
|
|
|
|
def _load_post_tasks(self, attr, ds):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Loads a list of blocks from a list which may be mixed tasks/blocks.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
Bare tasks outside of a block are given an implicit block.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
try:
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
|
|
|
raise AnsibleParserError("A malformed block was encountered.", obj=self._ds)
|
|
|
|
|
|
|
|
|
|
|
|
def _load_handlers(self, attr, ds):
|
|
|
|
def _load_handlers(self, attr, ds):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
Loads a list of blocks from a list which may be mixed handlers/blocks.
|
|
|
|
Loads a list of blocks from a list which may be mixed handlers/blocks.
|
|
|
|
Bare handlers outside of a block are given an implicit block.
|
|
|
|
Bare handlers outside of a block are given an implicit block.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
try:
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, use_handlers=True, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
return load_list_of_blocks(ds=ds, play=self, use_handlers=True, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
|
|
|
raise AnsibleParserError("A malformed block was encountered.", obj=self._ds)
|
|
|
|
|
|
|
|
|
|
|
|
def _load_roles(self, attr, ds):
|
|
|
|
def _load_roles(self, attr, ds):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
@ -189,7 +201,10 @@ class Play(Base, Taggable, Become):
|
|
|
|
if ds is None:
|
|
|
|
if ds is None:
|
|
|
|
ds = []
|
|
|
|
ds = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
role_includes = load_list_of_roles(ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
role_includes = load_list_of_roles(ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
|
|
|
raise AnsibleParserError("A malformed role declaration was encountered.", obj=self._ds)
|
|
|
|
|
|
|
|
|
|
|
|
roles = []
|
|
|
|
roles = []
|
|
|
|
for ri in role_includes:
|
|
|
|
for ri in role_includes:
|
|
|
|