Azure / Azure/azure_preview_modules

azure_rm_aks 'NoneType' object does not support item assignment

Open
#338 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
43
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Since I update to ansible 2.9 I'm not able anymore to use this task. (It was working well before)
Ansible task:
```
- azure_rm_aks:
name: "{{ aks_cluster_name }}"
dns_prefix: "{{ aks_cluster_subdomain }}"
enable_rbac: yes
kubernetes_version: "{{ aks_kubernetes_version }}"
resource_group: "{{ azure_resource_group_name }}"
linux_profile:
admin_username: "{{ aks_admin_user }}"
ssh_key: "{{ aks_admin_ssh_key }}"
agent_pool_profiles:
- name: default
count: "{{ aks_cluster_default_vm_count }}"
vm_size: "{{ aks_cluster_default_vm_size }}"
service_principal:
client_id: "{{ lookup('ini', 'client_id section=' + aks_service_principal_name +' file=~/.azure/credentials') }}"
client_secret: "{{ lookup('ini', 'secret section=' + aks_service_principal_name +' file=~/.azure/credentials') }}"
tags:
Environment: "{{ aks_cluster_environment_tag }}"
```
Stack trace :
```
The full traceback is:
Traceback (most recent call last):
File "/Users/florian/.ansible/tmp/ansible-tmp-1576249857.2375429-149151740595734/AnsiballZ_azure_rm_aks.py", line 102, in
_ansiballz_main()
File "/Users/florian/.ansible/tmp/ansible-tmp-1576249857.2375429-149151740595734/AnsiballZ_azure_rm_aks.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/florian/.ansible/tmp/ansible-tmp-1576249857.2375429-149151740595734/AnsiballZ_azure_rm_aks.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.cloud.azure.azure_rm_aks', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 838, in
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 834, in main
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 526, in __init__
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/module_utils/azure_rm_common.py", line 348, in __init__
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 542, in exec_module
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 752, in get_aks
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 304, in create_aks_dict
File "/var/folders/4n/k586r4d94fs6g8f1b6jlfcr80000gn/T/ansible_azure_rm_aks_payload_ut2crep9/ansible_azure_rm_aks_payload.zip/ansible/modules/cloud/azure/azure_rm_aks.py", line 330, in create_addon_dict
TypeError: 'NoneType' object does not support item assignment
````
pip freeze
```
pip freeze ansible[azure]
adal==1.2.2
ansible==2.9.2
ansible-lint==4.2.0
applicationinsights==0.11.9
argcomplete==1.10.3
azure-cli-core==2.0.35
azure-cli-nspkg==3.0.2
azure-common==1.1.11
azure-graphrbac==0.40.0
azure-keyvault==1.0.0a1
azure-mgmt-authorization==0.51.1
azure-mgmt-automation==0.1.1
azure-mgmt-batch==5.0.1
azure-mgmt-cdn==3.0.0
azure-mgmt-compute==4.4.0
azure-mgmt-containerinstance==1.4.0
azure-mgmt-containerregistry==2.0.0
azure-mgmt-containerservice==4.4.0
azure-mgmt-cosmosdb==0.5.2
azure-mgmt-devtestlabs==3.0.0
azure-mgmt-dns==2.1.0
azure-mgmt-hdinsight==0.1.0
azure-mgmt-iothub==0.7.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-loganalytics==0.2.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==0.5.2
azure-mgmt-network==2.3.0
azure-mgmt-nspkg==2.0.0
azure-mgmt-rdbms==1.4.1
azure-mgmt-redis==5.0.0
azure-mgmt-resource==2.1.0
azure-mgmt-servicebus==0.5.3
azure-mgmt-sql==0.10.0
azure-mgmt-storage==3.1.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.41.0
azure-nspkg==2.0.0
azure-storage==0.35.1
bcrypt==3.1.7
cachetools==3.1.1
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
colorama==0.4.3
cryptography==2.8
dictdiffer==0.8.0
docker==4.1.0
google-auth==1.8.1
humanfriendly==4.18
idna==2.8
isodate==0.6.0
Jinja2==2.10.3
jmespath==0.9.4
jsondiff==1.2.0
knack==0.3.3
kubernetes==10.0.1
MarkupSafe==1.1.1
msrest==0.6.1
msrestazure==0.5.0
oauthlib==3.1.0
openshift==0.10.1
packaging==19.2
paramiko==2.7.1
pg==0.1
Pillow==6.2.1
prettytable==0.7.2
psycopg2-binary==2.8.4
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycparser==2.19
Pygments==2.5.2
PyJWT==1.7.1
PyNaCl==1.3.0
PyOpenGL==3.1.4
pyOpenSSL==19.1.0
pyparsing==2.4.5
python-dateutil==2.8.1
python-string-utils==0.6.0
PyYAML==5.2
requests==2.22.0
requests-oauthlib==1.3.0
rsa==4.0
ruamel.yaml==0.16.5
ruamel.yaml.clib==0.2.0
six==1.13.0
tabulate==0.8.2
urllib3==1.25.7
virtualenv==16.7.8
websocket-client==0.56.0
xmltodict==0.12.0
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.