Skip to content

Commit 22d50a3

Browse files
mnaserAkasurde
authored andcommitted
synchronize: use _find_needle instead
1 parent 1994b2c commit 22d50a3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

plugins/action/synchronize.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ def _get_absolute_path(self, path):
4848
if ':' in path or path.startswith('/'):
4949
return path
5050

51-
if self._task._role is not None:
52-
path = self._loader.path_dwim_relative(self._task._role._role_path, 'files', path)
53-
else:
54-
path = self._loader.path_dwim_relative(self._loader.get_basedir(), 'files', path)
51+
path = self._find_needle('files', path)
5552

5653
if original_path and original_path[-1] == '/' and path[-1] != '/':
5754
# make sure the dwim'd path ends in a trailing "/"

0 commit comments

Comments
 (0)