Closed vitabaks closed 1 month ago
PLAY [Deploy PostgreSQL HA Cluster (based on "Patroni")] ***********************
...
TASK [cloud-resources : Check if Azure CLI is installed] ***********************
ok: [localhost -> 127.0.0.1]
TASK [cloud-resources : Login to Azure using Service Principal] ****************
changed: [localhost -> 127.0.0.1]
...
TASK [cloud-resources : Azure: Create or modify Load Balancer] *****************
ok: [localhost] => (item=postgres-cluster-azure-primary)
TASK [cloud-resources : Extract virtual machine private IPs] *******************
ok: [localhost] => (item=10.0.1.4)
TASK [cloud-resources : Azure: Add virtual machine IP addresses to Load Balancer backend pool] ***
changed: [localhost] => (item=postgres-cluster-azure-primary-backend)
...
passed
We use Azure CLI because there is currently no Ansible module available to manage the list of IP addresses within a backend pool.
Previously, manual authentication via
az login
was required, which was not feasible when deploying the cluster through the Console (UI) or CI/CD. With this change, we now use a Service Principal to automate the authentication process in Azure, making the deployment fully automated and suitable for CI/CD pipelines.Fixed: