azure_preview_modules
azure_preview_modules copied to clipboard
Automation for Azure RM with AKS all of sudden stopped working, any idea why?
So i've had this CI/CD pipeline running for months with the occasional hiccups (to be fair it ran like clockwork for the last few months and then all of sudden I started getting the occasional failure but I would rerun it and it would be ok. That happened for about a 2 weeks. Now its just stopped working. Below is the code:
-
name: Create resource group azure_rm_resourcegroup: name: "{{ rg }}" location: "{{ location }}" state: present
-
name: List supported kubernetes version from Azure azure_rm_aksversion_info: location: "{{ location }}" register: versions
-
name: Create AKS cluster with RBAC enabled azure_rm_aks: name: "{{ aks_name|lower }}" location: "{{ aks_locale }}" resource_group: "{{ rg }}" dns_prefix: '{{ aks_name|lower|replace ("_", "-")}}-dns' addon: http_application_routing: enabled: yes enable_rbac: yes kubernetes_version: "{{ version }}" agent_pool_profiles: - name: default count: 3 vm_size: Standard_D2_v2 linux_profile: admin_username: ansible ssh_key: "{{ vault_ssh_key }}" service_principal: client_id: "{{ vault_client_id }}" client_secret: "{{ vault_client_secret }}"
aad_profile:
client_app_id: "{{ client_app_id }}"
server_app_secret: "{{ client_app_secret }}"
tenant_id: "{{ lookup('env', 'TENANT_ID') }}"
state: present
register: aks changed_when: false
-
name: Save cluster user config copy: content: "{{ aks.kube_config }}" dest: "aks-{{ aks_name|lower }}-kubeconfig-user" register: usr_config changed_when: false
-
name: Get admin config of AKS azure_rm_aks_info: resource_group: "{{ rg }}" name: "{{ aks_name|lower }}" show_kubeconfig: admin register: aks_admin changed_when: false
#- name: Save the kubeconfig
copy:
content: "{{ aks.aks[0].kube_config }}"
dest: "aks-{{ aks_name }}-kubeconfig"
register: save_kubecfg
changed_when: false
Keep in mind i just added the code for http_application_routing but I removed it (commented out and its throwing the exact same error). The error is here:
{
"module_stdout": "",
"module_stderr": "Traceback (most recent call last):\n File "
I have no idea why this is happening out of no where. If I have to I will start off commenting everything but the basics out but I'm still learning ansible so I cant help but feel like there is something I'm missing. The fact it broke on its own is the only I feel like something else may be wrong.
protip: I'm running this thru AWX 4.0.0 on Ansible 2.9.
Did you find any solution?
Yeah it appears something broke and they made a merge request with the fix. There is a way to call the replacement code down but I havent figured out how to implement it.
https://github.com/ansible-collections/azure/issues/167
Hi I'm the guy from the bug report. It's already fixed in the current version of ansible 2.9.11 that i get when i install it via pip install ansible[azure]