Handle Multiple Azure Subscription in Single Playbook

Posted on
  • I have multiple "Microsoft Azure Resource Manager" type Credentials stored in Ansible Tower Credentials.
  • The naming convention is standard for all stored credentials
    "MS Azure Creds ClientName"

  • Now if "ClientName" is an input for my Job Template
    How can I access right set of credentials to perform any Azure Operations.

For example:
Stored Credentials:
1. MS Azure Creds Client-1
2. MS Azure Creds Client-2

Input for Job Template: Client-2

Playbook should get/fetch 'MS Azure Creds Client-2' and list VMs in one of the Resource groups(Assume Resource Group is also an input)

Responses