ansible/test/units
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
..
cli Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
contrib Remove shebangs from unit tests. 2017-02-27 17:53:10 -08:00
errors Legacy pep8 updates for setup.py and tests 2017-02-11 16:04:52 -08:00
executor Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
inventory Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
module_utils Added Virtuozzo distribution support 2017-03-29 08:47:05 -07:00
modules nxos_vlan tweaks (#23194) 2017-04-18 10:49:47 -04:00
parsing Fix vault reading from stdin (avoid realpath() on non-links) (#23583) 2017-04-18 13:09:02 -04:00
playbook Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
plugins Ryanpineo fix ipaddr netmask with 32 cidr (#23506) 2017-04-11 14:10:43 -07:00
template Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
utils PEP 8 indent cleanup. (#20800) 2017-01-29 07:28:53 +00:00
vars Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
conftest.py Run unit tests in isolation w/ coverage support. 2017-02-27 17:16:45 -08:00
test_constants.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00