Authentication

There are different ways to ensure that Ansible is able to manage Azure for you, based on the way your Azure account is set up, but they can all be configured in the ~/.azure/credentials file.

If you want Ansible to use the principal credentials for the Azure account, you will need to create a file that resembles the following:

[default]
subscription_id = [YOUR_SUBSCIRPTION_ID_HERE]
client_id = [YOUR_CLIENT_ID_HERE]
secret = [YOUR_SECRET_HERE]
tenant = [YOUR_TENANT_HERE]

If you prefer to use Active Directories with a username and password, you can do something like this:

[default]
ad_user = [YOUR_AD_USER_HERE]
password = [YOUR_AD_PASSWORD_HERE]

Lastly, you can opt for an Active Directory login with ADFS. In this case, you'll need to set some additional parameters. You'll end up with something like this:

[default]
ad_user = [YOUR_AD_USER_HERE]
password = [YOUR_AD_PASSWORD_HERE]
client_id = [YOUR_CLIENT_ID_HERE]
tenant = [YOUR_TENANT_HERE]
adfs_authority_url = [YOUR_ADFS_AUTHORITY_URL_HERE]

The same parameters can be passed as parameters or as environmental variables if it makes more sense.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.231.245