multiple inventories with different credentials

In Ansible CLI, I can have one inventory file with 2 groups, routers and switches. Each group has its own credentials. Then I have a playbook that is running on switches, but also needs to execute a command on routers. I use the delegate_to command. This works fine in cli but how can I get it to work in Tower? In tower I can create 2 inventories, each with its own credential profile. I can put them into one inventory and use groups as well but how do I add both credentials?

In a job template, I can only choose one inventory and one credentials profile.

Hi,

You can set ansible_user and ansible_password in groups or hosts vars.Encrypt all passwords with vault and use the vault credential in your job template