I am new to Azure DevOps and have a requirement where AKS cluster is provisioned through terraform which creates two kubeconfig admin & user files in Azure Devops artifacts. Now I have to call this kubeconfig files to another pipeline to manage post-provisioning activities of AKS cluster through Ansible playbooks.
Is there any way this can be achieved.
One way is to build your terraform with Build yaml pipeline and use the build artifact in a release pipeline, Your build artifact will include the kube config files and then run your ansible task in Release pipeline.
Another way is to Publish your artifact and Download your published artifact and use it in your ansible task with the YAML pipeline code below:-
I deployed one AKS with kubeconfig with Azure Devops Release pipeline like below:-
Publish the Artifact and Download the Published Artifact like below and run your Ansible playbook with Ansible playbook Run task:-