Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Obtain full path for a file for action module
- def _get_absolute_path(self, path):
- if path.startswith('/'):
- return path
- if self._task._role is not None:
- path = self._loader.path_dwim_relative(self._task._role._role_path, 'files', path)
- else:
- path = self._loader.path_dwim_relative(self._loader.get_basedir(), 'files', path)
- return path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement