-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meraki_admin - KeyError: 'network' #97
Comments
I didn't see this one come in last night. Give me a little time to test and report back. Thank you for the report! |
@sstone173 I was able to verify this bug and fix it. Please try the code in #100. Let me know if you're not familiar with how to pull these changes. |
@kbreit I'm pretty new to this, so I'm not familiar with how to pull these changes into my local environment (Ubuntu 20.04 in WSL2), any help would be greatly appreciated :) |
@sstone173 I can't speak to WSL2 but my guess is in your home directory in Linux you'll find a .ansible directory. I have |
@kbreit Was able to get the file updated and confirm that it is working now, thanks for all the help! |
Glad to hear it works. I’ll have a new release this weekend with the fix. |
When trying to create an admin with network(s) assigned during creation, I'm receiving the following error:
Traceback (most recent call last):
File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 102, in
_ansiballz_main()
File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.meraki.meraki_admin', init_globals=None, run_name='main', alter_sys=True)
File "/usr/lib/python3.8/runpy.py", line 206, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 498, in
File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 470, in main
File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 336, in create_admin
File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 316, in network_factory
KeyError: 'network'
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 102, in \n _ansiballz_main()\n File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/steve/.ansible/tmp/ansible-tmp-1592414226.5026495-265972714452428/AnsiballZ_meraki_admin.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.meraki.meraki_admin', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib/python3.8/runpy.py", line 206, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 498, in \n File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 470, in main\n File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 336, in create_admin\n File "/tmp/ansible_meraki_admin_payload_2hzpculp/ansible_meraki_admin_payload.zip/ansible/modules/network/meraki/meraki_admin.py", line 316, in network_factory\nKeyError: 'network'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Playbook:
name: Meraki Playbook - Create User
connection: local
hosts: localhost
tasks:
meraki_admin:
auth_key:
org_id:
state: present
name: Test User
org_access: none
email: testuser@email.com
networks:
- id: N_12345XXXXXXXXXXX
access: full
The text was updated successfully, but these errors were encountered: