This commit is contained in:
parent
e9a5c53512
commit
9a18385fab
1 changed files with 6 additions and 0 deletions
|
@ -161,6 +161,12 @@ class Block(Base, Become, Conditional, Taggable):
|
|||
except AssertionError as e:
|
||||
raise AnsibleParserError("A malformed block was encountered while loading always", obj=self._ds, orig_exc=e)
|
||||
|
||||
def _validate_always(self, attr, name, value):
|
||||
if value and not self.block:
|
||||
raise AnsibleParserError("'%s' keyword cannot be used without 'block'" % name, obj=self._ds)
|
||||
|
||||
_validate_rescue = _validate_always
|
||||
|
||||
def get_dep_chain(self):
|
||||
if self._dep_chain is None:
|
||||
if self._parent:
|
||||
|
|
Loading…
Reference in a new issue