community.general/lib/ansible/cli
Adrian Likins 6e737c8cb6
Fix 'New Vault password' on vault 'edit' (#35923)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834
2018-03-27 14:12:21 -04:00
..
__init__.py add a vault --encrypt-vault-to specify vault id to use for encrypt (#31067) 2018-01-22 17:12:10 -05:00
adhoc.py Fix Python 3.7 syntax error. 2018-01-09 17:34:26 -08:00
config.py deal with no config for view 2018-02-14 15:53:40 -05:00
console.py Fix ansible-console always asking for vault passwords 2018-02-15 15:40:51 -05:00
doc.py Module deprecation: docs, scheme and tests (#34100) 2018-01-30 12:23:52 +00:00
galaxy.py Ansible Galaxy: skel for network role #37241 (#37251) 2018-03-09 13:31:27 -05:00
inventory.py Inv export (#36188) 2018-02-14 15:45:15 -05:00
playbook.py dont warn on not matching 'all' (#32806) 2017-12-15 15:43:51 -05:00
pull.py Compare byte strings to byte strings 2018-03-20 12:04:05 -07:00
vault.py Fix 'New Vault password' on vault 'edit' (#35923) 2018-03-27 14:12:21 -04:00