title: Ansible multiple password vaults in group_vars file
body: <p>I am having an issue with Ansible attempting to decode the incorrect vault when passing a command in.</p>
  
  <p>The setup is a follows:</p>
  
  <p>My ansible.cfg</p>
  
  <pre><code>[defaults]
  transport=smart
  hostfile=./hosts
  host_key_checking=False
  timeout=5
  
  [ssh_connection]
  ssh_args = ""
  </code></pre>
  
  <p>My hostfile:</p>
  
  <pre><code>[BigIP-Devices]
  BigIP-1
  BigIP-2
  
  [Cisco-Devices]
  Cisco-1
  Cisco-2
  TEST1
  </code></pre>
  
  <p>My group_vars:</p>
  
  <pre><code>BigIP-Devices   &lt;  This is a vault encrypted with bigip-vaultkey
  Cisco-Devices   &lt;  This is a vault encrypted with cisco-vaultkey
  bigip-vaultkey
  cisco-vaultkey
  </code></pre>
  
  <p>Both the vaults are like the following with different details for each:</p>
  
  <pre><code>---
   ansible_ssh_user: user
   ansible_ssh_pass: password
  </code></pre>
  
  <p>I am trying to use the following command:</p>
  
  <pre><code>ansible -c ssh Cisco-Devices  --vault-password-file ./group_vars/cisco-vaultkey --limit TEST1  -m raw -a "show version"
  </code></pre>
  
  <p>Even though it's calling Cisco-Devices in the command, I get the following error:</p>
  
  <pre><code>ERROR! Decryption failed on /home/users/ansible/device-access/group_vars/BigIP-Devices
  </code></pre>
  
  <p>However, if I move the BigIP files out of group_vars, it works correctly.</p>
  
  <p>Any one have any ideas?</p>
  
  <p>Many thanks in advance for your help!!!</p>