1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

add transparent vault use to other plugins (#16957)

assemble, script and unarchive (copy already had it).
This commit is contained in:
Brian Coca 2016-08-04 18:35:30 -04:00 committed by GitHub
parent eb2a3a91a8
commit bced8715cd
3 changed files with 4 additions and 3 deletions

View file

@ -48,7 +48,8 @@ class ActionModule(ActionBase):
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:

View file

@ -72,7 +72,7 @@ class ActionModule(ActionBase):
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))

View file

@ -68,7 +68,7 @@ class ActionModule(ActionBase):
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)