www.coachdevops.com/2024/04/a...
Pre-requisites:
Azure account subscription, click here if you don't have one.
Azure CLI needs to be installed.
Service principal to create any resources in Azure cloud
Microsoft organization
Login to Azure
az login
Enter Microsoft credentials
Create Azure Service Principal
Run the following commands to create an Azure Service Principal:
az ad sp create-for-rbac --name ansible-azure-sp --role Contributor --scopes /subscriptions/subscription_id
Save the above output in a file as you will not be able retrieve later.
Create an Ansible playbook - create-linux-app-svc.yml
Create Azure YAML build pipeline:
Add below four pipeline variables with value received from service principal creation.
Add tasks in the pipeline
Execute the pipeline
Clean up task
17 июл 2024