mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-10 07:10:02 -07:00
Meraki - Integration tests now clean up on failure (#42227)
* Added block and always support to meraki_network integration test * Add blocks to admin and vlan integration test * Resolved bad variable names
This commit is contained in:
parent
75c8d8bfc2
commit
f9cbdcd426
3 changed files with 723 additions and 724 deletions
|
@ -1,9 +1,10 @@
|
|||
# Test code for the Meraki Organization module
|
||||
# Test code for the Meraki Admin module
|
||||
# Copyright: (c) 2018, Kevin Breit (@kbreit)
|
||||
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: Create new administrator
|
||||
- block:
|
||||
- name: Create new administrator
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -14,13 +15,13 @@
|
|||
delegate_to: localhost
|
||||
register: create_orgaccess
|
||||
|
||||
- name: Create new admin assertion
|
||||
- name: Create new admin assertion
|
||||
assert:
|
||||
that:
|
||||
- create_orgaccess.changed == true
|
||||
- 'create_orgaccess.data.name == "Jane Doe"'
|
||||
|
||||
- name: Delete recently created administrator
|
||||
- name: Delete recently created administrator
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: absent
|
||||
|
@ -29,7 +30,7 @@
|
|||
delegate_to: localhost
|
||||
register: delete_one
|
||||
|
||||
- name: Create new administrator with org_id
|
||||
- name: Create new administrator with org_id
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -40,13 +41,13 @@
|
|||
delegate_to: localhost
|
||||
register: create_orgaccess_id
|
||||
|
||||
- name: Create new admin assertion
|
||||
- name: Create new admin assertion
|
||||
assert:
|
||||
that:
|
||||
- create_orgaccess_id.changed == true
|
||||
- 'create_orgaccess_id.data.name == "Jane Doe"'
|
||||
|
||||
- name: Create administrator with tags
|
||||
- name: Create administrator with tags
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -60,13 +61,13 @@
|
|||
delegate_to: localhost
|
||||
register: create_tags
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- create_tags.changed == true
|
||||
- create_tags.data.name == "John Doe"
|
||||
- create_tags.data.tags | length == 2
|
||||
|
||||
- name: Create administrator with invalid tags
|
||||
- name: Create administrator with invalid tags
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -81,12 +82,12 @@
|
|||
register: create_tags_invalid
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- '"400" in create_tags_invalid.msg'
|
||||
# - '"must contain only valid tags" in create_tags_invalid.msg'
|
||||
|
||||
- name: Create administrator with invalid tag permission
|
||||
- name: Create administrator with invalid tag permission
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -101,12 +102,12 @@
|
|||
register: create_tags_invalid_permission
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- '"400" in create_tags_invalid_permission.msg'
|
||||
# - '"Invalid permission type" in create_tags_invalid_permission.msg'
|
||||
|
||||
- name: Make sure TestNet and TestNet2 are created
|
||||
- name: Make sure TestNet and TestNet2 are created
|
||||
meraki_network:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -117,7 +118,7 @@
|
|||
- TestNet
|
||||
- TestNet2
|
||||
|
||||
- name: Create administrator with networks
|
||||
- name: Create administrator with networks
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -131,13 +132,13 @@
|
|||
delegate_to: localhost
|
||||
register: create_network
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- create_network.changed == true
|
||||
- create_network.data.name == "Jim Doe"
|
||||
- create_network.data.networks | length == 2
|
||||
|
||||
- name: Update administrator
|
||||
- name: Update administrator
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -150,13 +151,13 @@
|
|||
delegate_to: localhost
|
||||
register: update_network
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_network.changed == true
|
||||
- update_network.data.networks.0.access == "full"
|
||||
- update_network.data.networks | length == 1
|
||||
|
||||
- name: Update administrator for idempotency check
|
||||
- name: Update administrator for idempotency check
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -169,11 +170,11 @@
|
|||
delegate_to: localhost
|
||||
register: update_network_idempotent
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_network_idempotent.changed == false
|
||||
|
||||
- name: Create administrator with invalid network
|
||||
- name: Create administrator with invalid network
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -187,12 +188,12 @@
|
|||
register: create_network_invalid
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- '"No network found with the name" in create_network_invalid.msg'
|
||||
# - '"400" in create_network_invalid.msg'
|
||||
|
||||
- name: Query all administrators
|
||||
- name: Query all administrators
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: query
|
||||
|
@ -200,12 +201,12 @@
|
|||
delegate_to: localhost
|
||||
register: query_all
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- query_all.data | length == 4
|
||||
- query_all.changed == False
|
||||
|
||||
- name: Query admin by name
|
||||
- name: Query admin by name
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: query
|
||||
|
@ -214,7 +215,7 @@
|
|||
delegate_to: localhost
|
||||
register: query_name
|
||||
|
||||
- name: Query admin by email
|
||||
- name: Query admin by email
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: query
|
||||
|
@ -223,12 +224,16 @@
|
|||
delegate_to: localhost
|
||||
register: query_email
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- query_name.data.name == "Jane Doe"
|
||||
- 'query_email.data.email == "{{email_prefix}}+janedoe@{{email_domain}}"'
|
||||
|
||||
- name: Delete administrators
|
||||
always:
|
||||
#############################################################################
|
||||
# Tear down starts here
|
||||
#############################################################################
|
||||
- name: Delete administrators
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: absent
|
||||
|
@ -236,12 +241,13 @@
|
|||
email: '{{item}}'
|
||||
delegate_to: localhost
|
||||
register: delete_all
|
||||
ignore_errors: yes
|
||||
loop:
|
||||
- '{{email_prefix}}+janedoe@{{email_domain}}'
|
||||
- '{{email_prefix}}+johndoe@{{email_domain}}'
|
||||
- '{{email_prefix}}+jimdoe@{{email_domain}}'
|
||||
|
||||
- name: Query all administrators
|
||||
- name: Query all administrators
|
||||
meraki_admin:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: query
|
||||
|
@ -249,6 +255,6 @@
|
|||
delegate_to: localhost
|
||||
register: query_all_deleted
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- query_all_deleted.data | length == 1
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: Create network without type
|
||||
- block:
|
||||
- name: Create network without type
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -14,7 +15,7 @@
|
|||
register: create_net_no_type
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create network without organization
|
||||
- name: Create network without organization
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -24,7 +25,7 @@
|
|||
register: create_net_no_org
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create network with type switch
|
||||
- name: Create network with type switch
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -35,7 +36,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_switch
|
||||
|
||||
- name: Create network with type switch by org ID
|
||||
- name: Create network with type switch by org ID
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -46,7 +47,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_switch_org_id
|
||||
|
||||
- name: Create network with type appliance and no timezone
|
||||
- name: Create network with type appliance and no timezone
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -56,7 +57,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_appliance_no_tz
|
||||
|
||||
- name: Create network with type wireless
|
||||
- name: Create network with type wireless
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -67,7 +68,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_wireless
|
||||
|
||||
- name: Create network with type wireless and check for idempotency
|
||||
- name: Create network with type wireless and check for idempotency
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -78,7 +79,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_wireless_idempotent
|
||||
|
||||
- name: Create network with type combined
|
||||
- name: Create network with type combined
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -89,7 +90,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_combined
|
||||
|
||||
- name: Create network with one tag
|
||||
- name: Create network with one tag
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -101,10 +102,10 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_tag
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{create_net_tag}}'
|
||||
|
||||
- name: Create network with two tags
|
||||
- name: Create network with two tags
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -116,10 +117,10 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_tags
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{create_net_tags}}'
|
||||
|
||||
- name: Modify network
|
||||
- name: Modify network
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -131,7 +132,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_modified
|
||||
|
||||
- name: Modify network with idempotency
|
||||
- name: Modify network with idempotency
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: present
|
||||
|
@ -143,7 +144,7 @@
|
|||
delegate_to: localhost
|
||||
register: create_net_modified_idempotent
|
||||
|
||||
- name: Present assertions
|
||||
- name: Present assertions
|
||||
assert:
|
||||
that:
|
||||
- create_net_no_type.status == 500
|
||||
|
@ -160,7 +161,7 @@
|
|||
- create_net_modified.changed == True
|
||||
- create_net_modified_idempotent.changed == False
|
||||
|
||||
- name: Query all networks
|
||||
- name: Query all networks
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: query
|
||||
|
@ -168,7 +169,7 @@
|
|||
delegate_to: localhost
|
||||
register: net_query_all
|
||||
|
||||
- name: Query one network
|
||||
- name: Query one network
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: query
|
||||
|
@ -177,13 +178,17 @@
|
|||
delegate_to: localhost
|
||||
register: net_query_one
|
||||
|
||||
- name: Query assertions
|
||||
- name: Query assertions
|
||||
assert:
|
||||
that:
|
||||
# - net_query_all.data | length == 7
|
||||
- 'net_query_one.data.name == "IntTestNetworkSwitch"'
|
||||
|
||||
- name: Delete network without org
|
||||
|
||||
#############################################################################
|
||||
# Tear down starts here
|
||||
#############################################################################
|
||||
always:
|
||||
- name: Delete network without org
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: absent
|
||||
|
@ -192,10 +197,7 @@
|
|||
register: delete_all_no_org
|
||||
ignore_errors: yes
|
||||
|
||||
- debug:
|
||||
msg: '{{delete_all_no_org}}'
|
||||
|
||||
- name: Delete network by org ID
|
||||
- name: Delete network by org ID
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: absent
|
||||
|
@ -204,10 +206,7 @@
|
|||
delegate_to: localhost
|
||||
register: delete_net_org_id
|
||||
|
||||
- debug:
|
||||
msg: '{{delete_net_org_id}}'
|
||||
|
||||
- name: Query after delete with org ID
|
||||
- name: Query after delete with org ID
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: query
|
||||
|
@ -215,7 +214,7 @@
|
|||
delegate_to: localhost
|
||||
register: query_deleted_org_id
|
||||
|
||||
- name: Delete all networks
|
||||
- name: Delete all networks
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: absent
|
||||
|
@ -223,6 +222,7 @@
|
|||
net_name: '{{ item }}'
|
||||
delegate_to: localhost
|
||||
register: delete_all
|
||||
ignore_errors: yes
|
||||
loop:
|
||||
- IntTestNetworkSwitch
|
||||
- IntTestNetworkWireless
|
||||
|
@ -231,17 +231,6 @@
|
|||
- IntTestNetworkTag
|
||||
- IntTestNetworkTags
|
||||
|
||||
- name: Query after delete all
|
||||
meraki_network:
|
||||
auth_key: '{{ auth_key }}'
|
||||
state: query
|
||||
org_name: '{{test_org_name}}'
|
||||
delegate_to: localhost
|
||||
register: query_deleted
|
||||
|
||||
- name: Delete assertions
|
||||
assert:
|
||||
- assert:
|
||||
that:
|
||||
- '"org_name or org_id parameters are required" in delete_all_no_org.msg'
|
||||
# - query_deleted_org_id.data | length == 6
|
||||
# - query_deleted.data | length == 0
|
||||
- 'delete_all_no_org.msg == "org_name or org_id parameters are required"'
|
|
@ -1,42 +1,42 @@
|
|||
# Test code for the Meraki Organization module
|
||||
# Test code for the Meraki VLAN module
|
||||
# Copyright: (c) 2018, Kevin Breit (@kbreit)
|
||||
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
---
|
||||
- name: Test an API key is provided
|
||||
- block:
|
||||
- name: Test an API key is provided
|
||||
fail:
|
||||
msg: Please define an API key
|
||||
when: auth_key is not defined
|
||||
|
||||
- name: Use an invalid domain
|
||||
- name: Use an invalid domain
|
||||
meraki_vlan:
|
||||
auth_key: '{{ auth_key }}'
|
||||
host: marrrraki.com
|
||||
state: present
|
||||
org_name: '{{test_org_name}}'
|
||||
org_name: IntTestOrg
|
||||
output_level: debug
|
||||
delegate_to: localhost
|
||||
register: invalid_domain
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Disable HTTP
|
||||
- name: Disable HTTP
|
||||
meraki_vlan:
|
||||
auth_key: '{{ auth_key }}'
|
||||
use_https: false
|
||||
state: query
|
||||
org_name: '{{test_org_name}}'
|
||||
output_level: debug
|
||||
delegate_to: localhost
|
||||
register: http
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Connection assertions
|
||||
- name: Connection assertions
|
||||
assert:
|
||||
that:
|
||||
- '"Failed to connect to" in invalid_domain.msg'
|
||||
- '"http" in http.url'
|
||||
|
||||
- name: Create test network
|
||||
- name: Create test network
|
||||
meraki_network:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -45,7 +45,7 @@
|
|||
type: appliance
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Create VLAN
|
||||
- name: Create VLAN
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -58,15 +58,15 @@
|
|||
delegate_to: localhost
|
||||
register: create_vlan
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{create_vlan}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- create_vlan.data.id == 2
|
||||
- create_vlan.changed == True
|
||||
|
||||
- name: Update VLAN
|
||||
- name: Update VLAN
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -88,15 +88,15 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_vlan.data.applianceIp == '192.168.250.2'
|
||||
- update_vlan.changed == True
|
||||
|
||||
- name: Update VLAN with idempotency
|
||||
- name: Update VLAN with idempotency
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -118,14 +118,14 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan_idempotent
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan_idempotent}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_vlan_idempotent.changed == False
|
||||
|
||||
- name: Add IP assignments and reserved IP ranges
|
||||
- name: Add IP assignments and reserved IP ranges
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -153,16 +153,16 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan_add_ip
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan_add_ip}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_vlan_add_ip.changed == True
|
||||
- update_vlan_add_ip.data.fixedIpAssignments | length == 2
|
||||
- update_vlan_add_ip.data.reservedIpRanges | length == 2
|
||||
- update_vlan_add_ip.data.reservedIpRange | length == 2
|
||||
|
||||
- name: Remove IP assignments and reserved IP ranges
|
||||
- name: Remove IP assignments and reserved IP ranges
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -184,16 +184,16 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan_remove_ip
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan_remove_ip}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_vlan_remove_ip.changed == True
|
||||
- update_vlan_remove_ip.data.fixedIpAssignments | length == 1
|
||||
- update_vlan_remove_ip.data.reservedIpRanges | length == 1
|
||||
- update_vlan_remove_ip.data.reservedIpRange | length == 1
|
||||
|
||||
- name: Update VLAN with idempotency
|
||||
- name: Update VLAN with idempotency
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -215,14 +215,14 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan_idempotent
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan_idempotent}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- update_vlan_idempotent.changed == False
|
||||
|
||||
- name: Update VLAN with list of DNS entries
|
||||
- name: Update VLAN with list of DNS entries
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: present
|
||||
|
@ -244,15 +244,15 @@
|
|||
delegate_to: localhost
|
||||
register: update_vlan_dns_list
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{update_vlan_dns_list}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- '"1.1.1.1" in update_vlan_dns_list.data.dnsNameservers'
|
||||
- update_vlan_dns_list.changed == True
|
||||
|
||||
- name: Query all VLANs in network
|
||||
- name: Query all VLANs in network
|
||||
meraki_vlan:
|
||||
auth_key: '{{ auth_key }}'
|
||||
org_name: '{{test_org_name}}'
|
||||
|
@ -261,16 +261,16 @@
|
|||
delegate_to: localhost
|
||||
register: query_vlans
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{query_vlans}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- query_vlans.data | length >= 2
|
||||
- query_vlans.data.1.id == 2
|
||||
- query_vlans.changed == False
|
||||
|
||||
- name: Query single VLAN
|
||||
- name: Query single VLAN
|
||||
meraki_vlan:
|
||||
auth_key: '{{ auth_key }}'
|
||||
org_name: '{{test_org_name}}'
|
||||
|
@ -281,15 +281,19 @@
|
|||
delegate_to: localhost
|
||||
register: query_vlan
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{query_vlan}}'
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- query_vlan.data.id == 2
|
||||
- query_vlan.changed == False
|
||||
|
||||
- name: Delete VLAN
|
||||
always:
|
||||
#############################################################################
|
||||
# Tear down starts here
|
||||
#############################################################################
|
||||
- name: Delete VLAN
|
||||
meraki_vlan:
|
||||
auth_key: '{{auth_key}}'
|
||||
state: absent
|
||||
|
@ -299,5 +303,5 @@
|
|||
delegate_to: localhost
|
||||
register: delete_vlan
|
||||
|
||||
- debug:
|
||||
- debug:
|
||||
msg: '{{delete_vlan}}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue