mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
meraki - Enabled support for configuration template configuration (#42392)
* Enabled support for configuration template configuration - get_nets() now pulls down templates and networks - A few changes in VLAN and network to operate as a POC * Ansibot changes - Fix undefined variable - Document net_id in meraki_vlan * Fix indentation
This commit is contained in:
parent
779f3c0c1a
commit
9036f846a3
4 changed files with 66 additions and 2 deletions
|
@ -169,6 +169,15 @@
|
|||
delegate_to: localhost
|
||||
register: net_query_all
|
||||
|
||||
- name: Query a configuration template
|
||||
meraki_network:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: query
|
||||
org_name: '{{test_org_name}}'
|
||||
net_name: '{{test_template_name}}'
|
||||
delegate_to: localhost
|
||||
register: query_config_template
|
||||
|
||||
- name: Query one network
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
|
@ -182,6 +191,7 @@
|
|||
assert:
|
||||
that:
|
||||
- 'net_query_one.data.name == "IntTestNetworkSwitch"'
|
||||
- 'query_config_template.data.name == "DevConfigTemplate"'
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
|
|
@ -66,6 +66,24 @@
|
|||
- create_vlan.data.id == 2
|
||||
- create_vlan.changed == True
|
||||
|
||||
- name: Create VLAN in template configuration
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
org_name: '{{test_org_name}}'
|
||||
net_name: '{{test_template_name}}'
|
||||
vlan_id: 2
|
||||
name: TestVLAN
|
||||
subnet: 192.168.250.0/24
|
||||
appliance_ip: 192.168.250.1
|
||||
delegate_to: localhost
|
||||
register: create_vlan_template
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- create_vlan_template.data.id == 2
|
||||
- create_vlan_template.changed == True
|
||||
|
||||
- name: Update VLAN
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
|
@ -305,3 +323,16 @@
|
|||
|
||||
- debug:
|
||||
msg: '{{delete_vlan}}'
|
||||
|
||||
- name: Delete VLAN using template ID
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: absent
|
||||
org_name: '{{test_org_name}}'
|
||||
net_id: '{{test_template_id}}'
|
||||
vlan_id: 2
|
||||
delegate_to: localhost
|
||||
register: delete_vlan_template
|
||||
|
||||
- debug:
|
||||
msg: '{{delete_vlan_template}}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue