You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration
Adrian Likins a14d0f3586 Use vault_id when encrypted via vault-edit (#30772)
* Use vault_id when encrypted via vault-edit

On the encryption stage of
'ansible-vault edit --vault-id=someid@passfile somefile',
the vault id was not being passed to encrypt() so the files were
always saved with the default vault id in the 1.1 version format.

When trying to edit that file a second time, also with a --vault-id,
the file would be decrypted with the secret associated with the
provided vault-id, but since the encrypted file had no vault id
in the envelope there would be no match for 'default' secrets.
(Only the --vault-id was included in the potential matches, so
the vault id actually used to decrypt was not).

If that list was empty, there would be an IndexError when trying
to encrypted the changed file. This would result in the displayed
error:

ERROR! Unexpected Exception, this is probably a bug: list index out of range

Fix is two parts:

1) use the vault id when encrypting from edit

2) when matching the secret to use for encrypting after edit,
include the vault id that was used for decryption and not just
the vault id (or lack of vault id) from the envelope.

add unit tests for #30575 and intg tests for 'ansible-vault edit'

Fixes #30575
7 years ago
..
targets Use vault_id when encrypted via vault-edit (#30772) 7 years ago
asa.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
cloud-config-aws.yml.template Add region to ansible-test AWS cloud config. (#30733) 7 years ago
cloud-config-azure.yml.template Fix Azure config template. 7 years ago
cloud-config-cs.ini.template Add support for cloud tests to ansible-test. (#24315) 8 years ago
dellos6.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos9.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos10.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
eos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
integration_config.yml Fix cosmetic problems in YAML source 8 years ago
inventory Fixes #28540: Corrected ansible_host value for facthost[0:20] from 1270.0.0.1 to 127.0.0.1 (#28541) 7 years ago
inventory.network Add VyOS integration tests for net_linkagg (#26478) 8 years ago
inventory.networking.template Increase python version coverage for tests. (#24762) 8 years ago
inventory.remote.template Add support for OS X CI on Shippable. (#17160) 8 years ago
inventory.winrm.template Increase python version coverage for tests. (#24762) 8 years ago
ios.yaml IOS Ping: Add new module to support ping tests from IOS devices (#28557) 7 years ago
iosxr.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
junos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
network-all.yaml New module: management of the Nuage Networks VSP SDN solution (network/nuage/nuage_vspk) (#24895) 7 years ago
network-integration.cfg Increase socket connect retry timeout for integration test (#30681) 7 years ago
nxos.yaml Fix nxos_snmp_community idempotence issue (#30388) 7 years ago
ops.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
platform_agnostic.yaml remove net_command (#28525) 7 years ago
target-prefixes.network openvswitch targets via network-integration (#27295) 7 years ago
vyos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago