Skip to content

Commit

Permalink
add transparent vault use to other plugins (#16957)
Browse files Browse the repository at this point in the history
assemble, script and unarchive (copy already had it).
  • Loading branch information
bcoca committed Aug 4, 2016
1 parent eb2a3a9 commit bced871
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/ansible/plugins/action/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def _assemble_from_fragments(self, src_path, delimiter=None, compiled_regexp=Non
fragment = "%s/%s" % (src_path, f)
if not os.path.isfile(fragment) or (ignore_hidden and os.path.basename(fragment).startswith('.')):
continue
fragment_content = file(fragment).read()

fragment_content = file(self._loader.get_real_file(fragment)).read()

# always put a newline between fragments if the previous fragment didn't end with a newline.
if add_newline:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run(self, tmp=None, task_vars=None):
args = ' '.join(parts[1:])

try:
source = self._find_needle('files', source)
source = self._loader.get_real_file(self._find_needle('files', source))
except AnsibleError as e:
return dict(failed=True, msg=to_str(e))

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/unarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run(self, tmp=None, task_vars=None):

if copy:
try:
source = self._find_needle('files', source)
source = self._loader.get_real_file(self._find_needle('files', source))
except AnsibleError as e:
result['failed'] = True
result['msg'] = to_str(e)
Expand Down

0 comments on commit bced871

Please sign in to comment.