title: How to use multiple credentials for a single job-template in Ansible Tower?
body: <p>I need to use two different credentials for a single playbook in Ansible Tower Job-Template. In the playbook, I include two roles(one for Windows machine, one for Linux machine). While configuring the job-template, I have noticed that I am not able to select two machine credentials, hence the playbook fails.</p>
  
  <p>I have found a solution here <a href="https://stackoverflow.com/a/55870311/4715624">https://stackoverflow.com/a/55870311/4715624</a>, which includes creating two Ansible vaults (with the same vault password) under <code>host_vars</code> folder and saving the passwords there. This solution works from the command line e.g.
  <code>ansible-playbook -v test-multi-credential-playbook-in-ansible-tower.yml --ask-vault-pass</code></p>
  
  <p>Then I have created a vault type credential in Ansible Tower and tried to run the corresponding job with the that credential. But this doesn't work (authentication problem). Can someone please show me the correct way to use multiple credentials for a single playbook in Ansible Tower? Or it's not possible at all in Ansible Tower?</p>
  
  <p>UPDATE:
  My playbook looks like this:</p>
  
  <pre><code>---
  - hosts: all
    gather_facts: true
    tasks: 
      - name: Include ping linux task
        include_role: 
          name: roles/linux
        when: ansible_os_family != "Windows"
  
      - name: Include ping windows task
        include_role: 
          name: roles/windows
        when: ansible_os_family == "Windows"
  </code></pre>