mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 01:14:03 -07:00
Ability to import task lists and handler lists from a top level playbook file. It is possible
to use multiple import statements to implement 'class' like behavior, and also to share a common list of handlers between multiple patterns.
This commit is contained in:
parent
32c32abb4a
commit
ab408b0000
5 changed files with 62 additions and 8 deletions
|
@ -165,4 +165,12 @@ def prepare_writeable_dir(tree):
|
|||
if not os.access(tree, os.W_OK):
|
||||
exit("Cannot write to path %s" % tree)
|
||||
|
||||
def path_dwim(basedir, given):
|
||||
if given.startswith("/"):
|
||||
return given
|
||||
elif given.startswith("~/"):
|
||||
return os.path.expanduser(given)
|
||||
else:
|
||||
return os.path.join(basedir, given)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue