Comments (26)
Also I'm happy to help you test these and anything else you may need testing.
from ansible-meraki.
I already have some license functionality in one of the modules, I think meraki_device
. But it should have its own module. One challenge will be testing both types of licenses.
from ansible-meraki.
I could probably help with that as I have access to several large Meraki deployments which I manage using ansible-meraki.
from ansible-meraki.
I'll let you know when it's ready. I suspect this will be the hardest of the modules to write so I'm saving it for last.
I also need to figure out how to handle licenses for integration tests.
from ansible-meraki.
@richardjohnallsopp Are your organizations using organization-wide licenses or the Per-Device License (PDL) model? These endpoints seem to focus on PDL and they don't seem to work on the organization-wide/legacy model.
from ansible-meraki.
Ah well that sucks as yeah most if not all of mine use Org wide licenses :-(
from ansible-meraki.
To address your requirements.
- Moving licenses between organizations is a feature of the PDL structure.
- Claiming licenses seems to be reasonable. It existed in API v0 but I never tested it. Submit a feature with the Make a Wish button.
from ansible-meraki.
I've submitted a feature request for this bud.
from ansible-meraki.
Do you know if there is a way to automate the management IP of a MS appliance, or more specifically the vlan ID?
It's a little annoying, I can automate the full network stack, but the switch just gets an IP from a random DHCP server accessible on the trunked uplink port (so long as the trunked port is native vlan one). Then I have to manually set the vlan ID on this virtual management interface. I can set the native vlan on the trunk port to be the vlan I want the switch to pull an IP from, but the upstream device doesn't support native vlans on trunked interfaces so it creates an miss match between the switch and the SDWAN appliance (not Meraki).
from ansible-meraki.
@richardjohnallsopp Look at the meraki_management_interface
module. At first glance it supports only MX but I'm told it supports MX/MR/MS. How wan1/wan2 relate to MS or MR I don't know, but this should get you there. If there's new functionality you need (ex. VLAN) please create a new issue and I'll fix.
from ansible-meraki.
@kbreit yeah I did look at that module but for the life of me I couldn't see how the WAN interfaces translate to the MS interfaces and the Meraki API documentation is lacking somewhat. I shall dig it and see if I can get it to work :-)
from ansible-meraki.
Let me know what you find. I can make other modules with more sane parameters if needed.
from ansible-meraki.
It only works for MX devices
Enable or disable the interface (only for MX devices). Valid values are 'enabled', 'disabled', and 'not configured'.
What's super annoying is that you can query the management interface on a switch, but you can't set it.
- name: set vlan on management information
meraki_management_interface:
auth_key: "{{ auth_key }}"
org_name: "{{ org_name }}"
net_name: "{{ network_name }}"
state: "present"
serial: "{{ ms_serial }}"
wan1:
wan_enabled: "enabled"
using_static_ip: false
vlan: "30"
delegate_to: localhost
register: man_info
tags:
- "query_man"
- "setup_switch"
- name: query management information
meraki_management_interface:
auth_key: "{{ auth_key }}"
org_name: "{{ org_name }}"
net_name: "{{ network_name }}"
state: "query"
serial: "{{ ms_serial }}"
delegate_to: localhost
register: man_info
tags:
- "query_man"
- "setup_switch"
- debug: msg="{{ man_info }}"
tags:
- "query_man"
Output
TASK [set vlan on management information] ***************************************************************************************************************
fatal: [localhost -> localhost]: FAILED! => changed=false
msg: 'Unsupported parameters for (meraki_management_interface) module: man1 Supported parameters include: auth_key, host, internal_error_retry_time, net_id, net_name, org_id, org_name, output_format, output_level, rate_limit_retry_time, serial, state, timeout, use_https, use_proxy, validate_certs, wan1, wan2'
PLAY RECAP **********************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
(ansible-silverpeak) flynn@NCL-WL-16612:~/ansible-silverpeak/ansible$ ./configure_meraki_switch.sh -e site_code="f-pascu" --tags "query_man"
PLAY [all] **********************************************************************************************************************************************
TASK [set vlan on management information] ***************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'NoneType' object is not subscriptable
fatal: [localhost -> localhost]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File "/home/flynn/.ansible/tmp/ansible-tmp-1604013886.165115-173013334994219/AnsiballZ_meraki_management_interface.py", line 102, in <module>
_ansiballz_main()
File "/home/flynn/.ansible/tmp/ansible-tmp-1604013886.165115-173013334994219/AnsiballZ_meraki_management_interface.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/flynn/.ansible/tmp/ansible-tmp-1604013886.165115-173013334994219/AnsiballZ_meraki_management_interface.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.cisco.meraki.plugins.modules.meraki_management_interface', init_globals=None, run_name='__main__', alter_sys=False)
File "/home/flynn/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 208, in run_module
return _run_code(code, {}, init_globals, run_name, mod_spec)
File "/home/flynn/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_meraki_management_interface_payload_3u_uwcj4/ansible_meraki_management_interface_payload.zip/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py", line 369, in <module>
File "/tmp/ansible_meraki_management_interface_payload_3u_uwcj4/ansible_meraki_management_interface_payload.zip/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py", line 356, in main
TypeError: 'NoneType' object is not subscriptable
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
Query output
TASK [query management information] *********************************************************************************************************************
ok: [localhost -> localhost]
TASK [debug] ********************************************************************************************************************************************
ok: [localhost] =>
msg:
changed: false
data:
wan1:
using_static_ip: false
vlan: 30
failed: false
response: OK (unknown bytes)
status: 200
I feel like it would be so easy for them to enable it for switches too.
from ansible-meraki.
Thanks for letting me know. I'm asking about it.
from ansible-meraki.
@richardjohnallsopp I was able to get this to work using Paw and issuing raw requests to the API. I'll look into the module as I may need to adapt it.
from ansible-meraki.
Awesome, looking forward to testing :-)
from ansible-meraki.
Are you able to create a new issue for the management interface problems?
from ansible-meraki.
Sure
from ansible-meraki.
Hello, is there any module available to work with meraki licenses?
I need to list the available licenses and be able to assign a license to a computer.
Utilizo la version 2.9 de ansible
from ansible-meraki.
What do you mean assign a licenses to a computer?
There is an API v1 endpoint for claiming licenses into an Org but there are no Meraki Ansible modules using it https://developer.cisco.com/meraki/api-v1/#!claim-into-organization you could of course use Ansible's URI module to call the Endpoint which would be pretty straightforward.
from ansible-meraki.
I need to use the following endpoints in Ansible
https://developer.cisco.com/meraki/api-v1/#!get-organization-licenses
https://developer.cisco.com/meraki/api-v1/#!update-organization-license
I have been looking for information in the official Ansible documentation for meraki but there is nothing about this topic
from ansible-meraki.
As commented in this thread I've been interested in a licensing module but haven't done it. I have a lot of PTO coming up so I hope to tackle it. For now though you'll want to use the uri
module.
from ansible-meraki.
I want to confirm you're using org licenses (probably) and not per device licenses.
from ansible-meraki.
I am working with one license per device
from ansible-meraki.
Technically every device has a license. Do you mean you're using their newer per device license model?
from ansible-meraki.
Take a look at https://documentation.meraki.com/General_Administration/Licensing/Meraki_Licensing for more information on the options. The endpoints probably don't support both.
from ansible-meraki.
Related Issues (20)
- meraki_mx_vlan - add groupPolicyId HOT 1
- meraki_mr_radio_profile - Add support for AX setting
- SSL error while running playbooks HOT 1
- meraki_ms_switchport trunk with no native vlan HOT 1
- Issue with the ansible-lint HOT 2
- Update the workflow files HOT 1
- meraki_webhook query raises exception if no webhooks are defined HOT 13
- meraki_mx_vlan idempotency issues HOT 10
- meraki_network constraints around local and remote status pages is incorrect HOT 5
- meraki_webhook defaults shared_secret to null which clashes with API behaviour
- meraki_network query by ID returns empty data object HOT 1
- Consider using true/false for all booleans in docs HOT 3
- Problem with using loops within an organization's networks HOT 7
- meraki_static_route: Module does not query static routes HOT 4
- meraki_ms_switchport: link negotation has not all options
- Trying to get Kevin's attention HOT 2
- meraki_device module: Creating 404 errors HOT 11
- CI/DI for testing tests and endpoints HOT 1
- meraki_device making wrong API call HOT 7
- Future of the ansible-meraki on CiscoDevNet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-meraki.