1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/vault
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
..
roles added docs for vault and made trigger shorter: !vault (#20985) 2017-02-03 15:28:50 -05:00
aliases Initial ansible-test implementation. (#18556) 2016-11-29 21:21:53 -08:00
runme.sh Fix vault reading from stdin (avoid realpath() on non-links) (#23583) 2017-04-18 13:09:02 -04:00
test_vault.yml Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
test_vault_embedded.yml Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
test_vaulted_inventory.yml add a intg test for vault encrypted inventory (#18550) 2016-11-22 10:56:37 -05:00
vault-password Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
vault-secret.txt Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
vaulted.inventory add a intg test for vault encrypted inventory (#18550) 2016-11-22 10:56:37 -05:00