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 042079aa87 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

(cherry picked from commit a14d0f3586)
8 years ago
..
group_vars Move networking provider options to subspec (#28894) 8 years ago
host_vars breaks testing in non virtual envs, since env var can be used in those 10 years ago
roles Add a code-smell test for smart quotes and remove smart quotes from all files 8 years ago
targets Use vault_id when encrypted via vault-edit (#30772) 8 years ago
vars Split integration tests out from Makefile. (#17976) 9 years ago
Makefile Remove legacy integration test make targets. (#26255) 9 years ago
amazon.yml Adding support for Amazon ECR (#19306) 9 years ago
asa.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
azure.yml add azure integration tests 11 years ago
cleanup_azure.py test/: PEP8 compliancy (#24803) 9 years ago
cleanup_ec2.py Fix undefined variables, basestring usage, and some associated python3 issues 9 years ago
cleanup_gce.py Fix undefined variables, basestring usage, and some associated python3 issues 9 years ago
cleanup_rax.py Fix undefined variables, basestring usage, and some associated python3 issues 9 years ago
cloud-config-aws.yml.template Add support for cloud tests to ansible-test. (#24315) 9 years ago
cloud-config-azure.yml.template Fix Azure config template. 8 years ago
cloud-config-cs.ini.template Add support for cloud tests to ansible-test. (#24315) 9 years ago
cloudflare.yml Fix cosmetic problems in YAML source 9 years ago
cloudscale.yml new module cloudscale_server (#20175) 9 years ago
cnos.yaml New module: cnos_vlan and various utility files (#21107) 9 years ago
connection-buildah.yaml add connection plugin for buildah (#26170) 9 years ago
consul.yml Adds support for all Consul 0.8 ACL rule scopes (#25800) 8 years ago
consul_inventory.yml Initial commit of Ansible support for the Consul clustering framework (http://consul.io). 11 years ago
consul_running.py Support print() function in test/ 10 years ago
credentials.template Update git test to not rm ~/.ssh/known_hosts. 9 years ago
dellos6.yaml Migrate Network Tests into ansible/ansible (#18233) 9 years ago
dellos9.yaml Migrate Network Tests into ansible/ansible (#18233) 9 years ago
dellos10.yaml Migrate Network Tests into ansible/ansible (#18233) 9 years ago
eos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
exoscale.yml exo_dns: new module utils and integration tests for exoscale DNS (#17230) 9 years ago
galaxy_playbook.yml Allow installation of roles from yaml roles file 11 years ago
galaxy_playbook_git.yml [hotfix] add missed playbook file 10 years ago
galaxy_roles.yml Fix cosmetic problems in YAML source 9 years ago
galaxy_rolesfile Add tests for #10620 10 years ago
gce.yml [google] adding a GCE labels module 9 years ago
gce_credentials.py test/: PEP8 compliancy (#24803) 9 years ago
integration_config.yml Fix cosmetic problems in YAML source 9 years ago
inventory Fixes #28540: Corrected ansible_host value for facthost[0:20] from 1270.0.0.1 to 127.0.0.1 (#28541) 8 years ago
inventory.network Add VyOS integration tests for net_linkagg (#26478) 9 years ago
inventory.networking.template Increase python version coverage for tests. (#24762) 9 years ago
inventory.remote.template Add support for OS X CI on Shippable. (#17160) 9 years ago
inventory.winrm.template Increase python version coverage for tests. (#24762) 9 years ago
inventory.yaml add new yaml inventory for testing 9 years ago
ios.yaml IOS Ping: Add new module to support ping tests from IOS devices (#28557) 8 years ago
iosxr.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
jenkins.yml jenkins_job: add integration tests (#17499) 9 years ago
junos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
netscaler.yaml Lowercase enabled, disabled option values (#27764) 8 years ago
network-all.yaml New module: management of the Nuage Networks VSP SDN solution (network/nuage/nuage_vspk) (#24895) 9 years ago
network-integration.cfg Increase socket connect retry timeout for integration test (#30681) (#30683) 8 years ago
nuage.yaml New module: management of the Nuage Networks VSP SDN solution (network/nuage/nuage_vspk) (#24895) 9 years ago
nxos.yaml Fix nxos_snmp_community idempotence issue (#30388) 8 years ago
ops.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
ovs.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago
platform_agnostic.yaml remove net_command (#28525) 8 years ago
rackspace.yml Add tests for rax_scaling_group 11 years ago
setup_gce.py test/: PEP8 compliancy (#24803) 9 years ago
target-prefixes.network openvswitch targets via network-integration (#27295) 9 years ago
vyos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 8 years ago