title: How to combine multiple vars files per host?
body: <p>I have a playbook running against multiple servers. All servers require a <code>sudo</code> password to be specified, which is specific to each user running the playbook. When running the playbook, I can't use <code>--ask-become-pass</code>, because the sudo passwords on the servers differ. This is the same situation as in <a href="https://stackoverflow.com/a/33157327/1023963">another question about multiple sudo passwords</a>.</p>
  
  <p>A working solution is to specify <code>ansible_become_pass</code> in <code>host_vars</code>:</p>
  
  <pre><code># host_vars/prod01.yml
  ansible_become_pass: secret_prod01_password
  domain: prod01.example.com
  </code></pre>
  
  <pre><code># host_vars/prod02.yml
  ansible_become_pass: secret_prod02_password
  domain: prod02.example.com
  </code></pre>
  
  <p>Besides <code>ansible_become_pass</code>, there are other variables defined per host. These variables should be committed to the git repository. However, as <code>ansible_become_pass</code> is specific to each user running the playbook, I'd like to have a separate file (ideally, vaulted) which specifies the password per host.</p>
  
  <p>I imagine the following:</p>
  
  <pre><code># host_vars/prod01.yml: shared in git
  domain: prod01.example.com
  </code></pre>
  
  <pre><code># host_vars/prod01_secret.yml: in .gitignore
  ansible_become_pass: secret_prod01_password
  </code></pre>
  
  <p>I imagine both files to be combined by Ansible when running the playbook. Is this possible in Ansible? If so, how?</p>