community.general/lib/ansible/parsing
Adrian Likins ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
2017-04-18 13:09:02 -04:00
..
utils Fixing up jsonify and adding unit tests 2016-02-29 14:51:23 -05:00
vault Fix vault reading from stdin (avoid realpath() on non-links) (#23583) 2017-04-18 13:09:02 -04:00
yaml Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
__init__.py Fix typo in lib/ansible/parsing/__init__.py (#16761) 2016-07-20 18:03:50 -04:00
dataloader.py let user control "auto-de-vault" (#22739) 2017-03-24 15:39:25 -04:00
mod_args.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
quoting.py Break apart a looped dependency to show a warning when parsing playbooks 2015-10-27 12:39:42 -07:00
splitter.py Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00