mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00: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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user