summaryrefslogtreecommitdiff
path: root/test/integration/targets
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/meraki_admin/tasks/main.yml384
-rw-r--r--test/integration/targets/meraki_config_template/aliases1
-rw-r--r--test/integration/targets/meraki_config_template/tasks/main.yml196
-rw-r--r--test/integration/targets/meraki_content_filtering/aliases1
-rw-r--r--test/integration/targets/meraki_content_filtering/meraki_config_template/aliases1
-rw-r--r--test/integration/targets/meraki_content_filtering/meraki_config_template/tasks/main.yml117
-rw-r--r--test/integration/targets/meraki_content_filtering/tasks/main.yml247
-rw-r--r--test/integration/targets/meraki_device/aliases1
-rw-r--r--test/integration/targets/meraki_device/tasks/main.yml215
-rw-r--r--test/integration/targets/meraki_firewalled_services/aliases1
-rw-r--r--test/integration/targets/meraki_firewalled_services/tasks/main.yml7
-rw-r--r--test/integration/targets/meraki_firewalled_services/tasks/tests.yml196
-rw-r--r--test/integration/targets/meraki_malware/aliases1
-rw-r--r--test/integration/targets/meraki_malware/tasks/main.yml247
-rw-r--r--test/integration/targets/meraki_mr_l3_firewall/aliases1
-rw-r--r--test/integration/targets/meraki_mr_l3_firewall/tasks/main.yml100
-rw-r--r--test/integration/targets/meraki_mx_l3_firewall/aliases1
-rw-r--r--test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml203
-rw-r--r--test/integration/targets/meraki_mx_l7_firewall/aliases2
-rw-r--r--test/integration/targets/meraki_mx_l7_firewall/tasks/main.yml7
-rw-r--r--test/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml494
-rw-r--r--test/integration/targets/meraki_nat/tasks/main.yml7
-rw-r--r--test/integration/targets/meraki_nat/tasks/tests.yml363
-rw-r--r--test/integration/targets/meraki_network/aliases1
-rw-r--r--test/integration/targets/meraki_network/tasks/main.yml402
-rw-r--r--test/integration/targets/meraki_organization/aliases1
-rw-r--r--test/integration/targets/meraki_organization/tasks/main.yml8
-rw-r--r--test/integration/targets/meraki_organization/tasks/tests.yml127
-rw-r--r--test/integration/targets/meraki_snmp/aliases1
-rw-r--r--test/integration/targets/meraki_snmp/tasks/main.yml306
-rw-r--r--test/integration/targets/meraki_ssid/aliases1
-rw-r--r--test/integration/targets/meraki_ssid/tasks/main.yml408
-rw-r--r--test/integration/targets/meraki_static_route/aliases1
-rw-r--r--test/integration/targets/meraki_static_route/tasks/main.yml170
-rw-r--r--test/integration/targets/meraki_switchport/aliases1
-rw-r--r--test/integration/targets/meraki_switchport/tasks/main.yml297
-rw-r--r--test/integration/targets/meraki_syslog/tasks/main.yml169
-rw-r--r--test/integration/targets/meraki_vlan/aliases1
-rw-r--r--test/integration/targets/meraki_vlan/tasks/main.yml412
-rw-r--r--test/integration/targets/meraki_webhook/aliases1
-rw-r--r--test/integration/targets/meraki_webhook/tasks/main.yml7
-rw-r--r--test/integration/targets/meraki_webhook/tasks/tests.yml273
42 files changed, 0 insertions, 5380 deletions
diff --git a/test/integration/targets/meraki_admin/tasks/main.yml b/test/integration/targets/meraki_admin/tasks/main.yml
deleted file mode 100644
index 2fcc9eb6e9..0000000000
--- a/test/integration/targets/meraki_admin/tasks/main.yml
+++ /dev/null
@@ -1,384 +0,0 @@
-# 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)
----
-- block:
- - name: Create new administrator in check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jane Doe
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- org_access: read-only
- delegate_to: localhost
- check_mode: yes
- register: create_org_check
-
- - name: Create new admin check mode assertion
- assert:
- that:
- - create_org_check is changed
- - 'create_org_check.data.name == "Jane Doe"'
-
- - name: Create new administrator
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jane Doe
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- org_access: read-only
- delegate_to: localhost
- register: create_orgaccess
-
- - name: Create new admin assertion
- assert:
- that:
- - create_orgaccess.changed == true
- - 'create_orgaccess.data.name == "Jane Doe"'
-
- - name: Delete recently created administrator with check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- delegate_to: localhost
- register: delete_one_check
- check_mode: yes
-
- - assert:
- that:
- - delete_one_check is changed
-
- - name: Delete recently created administrator
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- delegate_to: localhost
- register: delete_one
-
- - name: Create new administrator with org_id
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_id: '{{test_org_id}}'
- name: Jane Doe
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- orgAccess: read-only
- delegate_to: localhost
- register: create_orgaccess_id
-
- - name: Create new admin assertion
- assert:
- that:
- - create_orgaccess_id.changed == true
- - 'create_orgaccess_id.data.name == "Jane Doe"'
-
- - name: Create administrator with tags with check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: John Doe
- email: '{{email_prefix}}+johndoe@{{email_domain}}'
- orgAccess: none
- tags:
- - { "tag": "production", "access": "read-only" }
- - tag: beta
- access: full
- delegate_to: localhost
- register: create_tags_check
- check_mode: yes
-
- - debug:
- var: create_tags_check
-
- - assert:
- that:
- - create_tags_check is changed
- - create_tags_check.data.name == "John Doe"
- - create_tags_check.data.tags | length == 2
-
- - name: Create administrator with tags
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: John Doe
- email: '{{email_prefix}}+johndoe@{{email_domain}}'
- orgAccess: none
- tags:
- - { "tag": "production", "access": "read-only" }
- - tag: beta
- access: full
- delegate_to: localhost
- register: create_tags
-
- - assert:
- that:
- - create_tags.changed == true
- - create_tags.data.name == "John Doe"
- - create_tags.data.tags | length == 2
-
- - name: Create administrator with invalid tags
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jake Doe
- email: '{{email_prefix}}+jakedoe@{{email_domain}}'
- orgAccess: none
- tags:
- - { "tag": "production", "access": "read-only" }
- - { "tag": "alpha", "access": "invalid" }
- delegate_to: localhost
- register: create_tags_invalid
- ignore_errors: yes
-
- - 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
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jake Doe
- email: '{{email_prefix}}+jakedoe@{{email_domain}}'
- orgAccess: none
- tags:
- - { "tag": "production", "access": "read-only" }
- - { "tag": "beta", "access": "invalid" }
- delegate_to: localhost
- register: create_tags_invalid_permission
- ignore_errors: yes
-
- - 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
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{item}}'
- type: switch
- loop:
- - TestNet
- - TestNet2
-
- - name: Create administrator with networks with check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "read-only" }
- - { "network": "TestNet2", "access": "full" }
- delegate_to: localhost
- register: create_network_check
- check_mode: yes
-
- - assert:
- that:
- - create_network_check is changed
- - create_network_check.data.name == "Jim Doe"
- - create_network_check.data.networks | length == 2
-
- - name: Create administrator with networks
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "read-only" }
- - { "network": "TestNet2", "access": "full" }
- delegate_to: localhost
- register: create_network
-
- - assert:
- that:
- - create_network.changed == true
- - create_network.data.name == "Jim Doe"
- - create_network.data.networks | length == 2
-
- - name: Update administrator with check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "full" }
- delegate_to: localhost
- register: update_network_check
- check_mode: yes
-
- - debug:
- var: update_network_check
-
- - assert:
- that:
- - update_network_check is changed
- - update_network_check.data.networks.0.access == "full"
- - update_network_check.data.networks | length == 1
-
- - name: Update administrator
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "full" }
- delegate_to: localhost
- register: update_network
-
- - 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 with check mode
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "full" }
- delegate_to: localhost
- register: update_network_idempotent_check
- check_mode: yes
-
- - debug:
- var: update_network_idempotent_check
-
- - assert:
- that:
- - update_network_idempotent_check is not changed
-
- - name: Update administrator for idempotency
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: Jim Doe
- email: '{{email_prefix}}+jimdoe@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "TestNet", "access": "full" }
- delegate_to: localhost
- register: update_network_idempotent
-
- - assert:
- that:
- - update_network_idempotent.changed == false
- - update_network_idempotent.data is defined
-
- - name: Create administrator with invalid network
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- name: John Doe
- email: '{{email_prefix}}+John@{{email_domain}}'
- orgAccess: none
- networks:
- - { "network": "readnet", "access": "read-only" }
- delegate_to: localhost
- register: create_network_invalid
- ignore_errors: yes
-
- - assert:
- that:
- - '"No network found with the name" in create_network_invalid.msg'
- # - '"400" in create_network_invalid.msg'
-
- - name: Query all administrators
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- delegate_to: localhost
- register: query_all
-
- - assert:
- that:
- - query_all.data | length == 4
- - query_all.changed == False
-
- - name: Query admin by name
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- name: Jane Doe
- delegate_to: localhost
- register: query_name
-
- - name: Query admin by email
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- email: '{{email_prefix}}+janedoe@{{email_domain}}'
- delegate_to: localhost
- register: query_email
-
- - assert:
- that:
- - query_name.data.name == "Jane Doe"
- - 'query_email.data.email == "{{email_prefix}}+janedoe@{{email_domain}}"'
-
- always:
- #############################################################################
- # Tear down starts here
- #############################################################################
- - name: Delete administrators
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- 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
- meraki_admin:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- delegate_to: localhost
- register: query_all_deleted
-
- - assert:
- that:
- - query_all_deleted.data | length == 1 \ No newline at end of file
diff --git a/test/integration/targets/meraki_config_template/aliases b/test/integration/targets/meraki_config_template/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_config_template/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_config_template/tasks/main.yml b/test/integration/targets/meraki_config_template/tasks/main.yml
deleted file mode 100644
index 12b18d1a28..0000000000
--- a/test/integration/targets/meraki_config_template/tasks/main.yml
+++ /dev/null
@@ -1,196 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Query all configuration templates
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- register: get_all
-
- - name: Delete non-existant configuration template
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- config_template: FakeConfigTemplate
- register: deleted
- ignore_errors: yes
-
- - assert:
- that:
- - '"No configuration template named" in deleted.msg'
-
- - name: Create a network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- type: appliance
- delegate_to: localhost
- register: net_info
-
- - set_fact:
- net_id: '{{net_info.data.id}}'
-
- - name: Bind a template to a network with check mode
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: '{{test_template_name}}'
- check_mode: yes
- register: bind_check
-
- - name: Bind a template to a network
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: '{{test_template_name}}'
- register: bind
-
- - assert:
- that:
- bind.changed == True
-
- - assert:
- that:
- bind_check is changed
-
- - name: Bind a template to a network when it's already bound
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: '{{test_template_name}}'
- register: bind_invalid
- ignore_errors: yes
-
- - assert:
- that:
- - bind_invalid.changed == False
-
- - name: Unbind a template from a network
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: '{{test_template_name}}'
- register: unbind
-
- - assert:
- that:
- unbind.changed == True
-
- - name: Unbind a template from a network when it's not bound
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: '{{test_template_name}}'
- register: unbind_invalid
-
- - assert:
- that:
- unbind_invalid.changed == False
-
- - name: Bind a template to a network via id
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- config_template: '{{test_template_name}}'
- register: bind_id
-
- - assert:
- that:
- bind_id.changed == True
-
- - name: Bind a template to a network via id for idempotency
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- config_template: '{{test_template_name}}'
- register: bind_id_idempotent
-
- - assert:
- that:
- - bind_id_idempotent.changed == False
- - bind_id_idempotent.data is defined
-
- - name: Unbind a template from a network via id with check mode
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- config_template: '{{test_template_name}}'
- check_mode: yes
- register: unbind_id_check
-
- - assert:
- that:
- unbind_id_check is changed
-
- - name: Unbind a template from a network via id
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- config_template: '{{test_template_name}}'
- register: unbind_id
-
- - assert:
- that:
- unbind_id.changed == True
-
- # This is disabled by default since they can't be created via API
- - name: Delete sacrificial template with check mode
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- config_template: sacrificial_template
- check_mode: yes
- register: delete_template_check
-
- # This is disabled by default since they can't be created via API
- - name: Delete sacrificial template
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- config_template: sacrificial_template
- output_level: debug
- register: delete_template
-
- - debug:
- var: delete_template
-
- always:
- - name: Delete network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_content_filtering/aliases b/test/integration/targets/meraki_content_filtering/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_content_filtering/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_content_filtering/meraki_config_template/aliases b/test/integration/targets/meraki_content_filtering/meraki_config_template/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_content_filtering/meraki_config_template/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_content_filtering/meraki_config_template/tasks/main.yml b/test/integration/targets/meraki_content_filtering/meraki_config_template/tasks/main.yml
deleted file mode 100644
index 4bec7d21de..0000000000
--- a/test/integration/targets/meraki_content_filtering/meraki_config_template/tasks/main.yml
+++ /dev/null
@@ -1,117 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- 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
- meraki_config_template:
- auth_key: '{{ auth_key }}'
- host: marrrraki.com
- state: query
- org_name: DevTestOrg
- output_level: debug
- delegate_to: localhost
- register: invalid_domain
- ignore_errors: yes
-
- - name: Connection assertions
- assert:
- that:
- - '"Failed to connect to" in invalid_domain.msg'
-
- - name: Query all configuration templates
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: query
- org_name: DevTestOrg
- register: get_all
-
- - name: Delete non-existant configuration template
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: DevTestOrg
- config_template: DevConfigTemplateInvalid
- register: deleted
- ignore_errors: yes
-
- - assert:
- that:
- - '"No configuration template named" in deleted.msg'
-
- - name: Create a network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- type: appliance
- delegate_to: localhost
-
- - name: Bind a template to a network
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: DevConfigTemplate
- register: bind
-
- - assert:
- that:
- bind.changed == True
-
- - name: Bind a template to a network when it's already bound
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: DevConfigTemplate
- register: bind_invalid
- ignore_errors: yes
-
- - assert:
- that:
- - bind_invalid.changed == False
-
- - name: Unbind a template from a network
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: DevConfigTemplate
- register: unbind
-
- - assert:
- that:
- unbind.changed == True
-
- - name: Unbind a template from a network when it's not bound
- meraki_config_template:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- config_template: DevConfigTemplate
- register: unbind_invalid
-
- - assert:
- that:
- unbind_invalid.changed == False
-
- always:
- - name: Delete network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{ test_org_name }}'
- net_name: '{{ test_net_name }}'
- delegate_to: localhost \ No newline at end of file
diff --git a/test/integration/targets/meraki_content_filtering/tasks/main.yml b/test/integration/targets/meraki_content_filtering/tasks/main.yml
deleted file mode 100644
index 92cf19d2ad..0000000000
--- a/test/integration/targets/meraki_content_filtering/tasks/main.yml
+++ /dev/null
@@ -1,247 +0,0 @@
-# Test code for the Meraki Content Filteringmodule
-# Copyright: (c) 2019, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- type: appliance
- timezone: America/Chicago
- delegate_to: localhost
- register: create_net_appliance
-
- - name: Test net_name and id exclusivity
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- net_id: 12345
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- register: net_exclusive
- ignore_errors: yes
-
- - assert:
- that:
- - 'net_exclusive.msg == "net_name and net_id are mutually exclusive"'
-
- - name: Set single allowed URL pattern with check mode
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- register: single_allowed_check
- check_mode: yes
-
- - assert:
- that:
- - single_allowed_check.data.allowed_url_patterns | length == 1
- - single_allowed_check is changed
-
- - name: Set single allowed URL pattern
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- register: single_allowed
-
- - assert:
- that:
- - single_allowed.data.allowed_url_patterns | length == 1
-
- - name: Set single allowed URL pattern for idempotency with check mode
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- register: single_allowed_idempotent_check
- check_mode: yes
-
- - debug:
- var: single_allowed_idempotent_check
-
- - assert:
- that:
- - single_allowed_idempotent_check is not changed
- - single_allowed.data.allowed_url_patterns | length == 1
-
- - name: Set single allowed URL pattern for idempotency
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- register: single_allowed_idempotent
-
- - debug:
- var: single_allowed_idempotent
-
- - assert:
- that:
- - single_allowed_idempotent.changed == False
- - single_allowed_idempotent.data is defined
-
- - name: Set single blocked URL pattern
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- blocked_urls:
- - "http://www.ansible.com/*"
- register: single_blocked
-
- - debug:
- var: single_blocked
-
- - assert:
- that:
- - single_blocked.data.blocked_url_patterns | length == 1
-
- - name: Set two allowed URL pattern
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- allowed_urls:
- - "http://www.ansible.com/*"
- - "http://www.redhat.com"
- register: two_allowed
-
- - debug:
- var: two_allowed
-
- - assert:
- that:
- - two_allowed.changed == True
- - two_allowed.data.allowed_url_patterns | length == 2
-
- - name: Set blocked URL category
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- category_list_size: full list
- blocked_categories:
- - "Adult and Pornography"
- register: blocked_category
-
- - debug:
- var: blocked_category
-
- - assert:
- that:
- - blocked_category.changed == True
- - blocked_category.data.blocked_url_categories | length == 1
- - blocked_category.data.url_category_list_size == "fullList"
-
- - name: Set blocked URL category with top sites
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- category_list_size: top sites
- blocked_categories:
- - "Adult and Pornography"
- register: blocked_category
-
- - debug:
- var: blocked_category
-
- - assert:
- that:
- - blocked_category.changed == True
- - blocked_category.data.blocked_url_categories | length == 1
- - blocked_category.data.url_category_list_size == "topSites"
-
- - name: Query all content filtering information
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- delegate_to: localhost
- register: query_all
-
- - debug:
- var: query_all
-
- - name: Query all content filtering assertion
- assert:
- that:
- - query_all.data.categories is defined
- - query_all.data.policy is defined
-
- - name: Query categories
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset: categories
- delegate_to: localhost
- register: query_categories
-
- - debug:
- var: query_categories
-
- - name: Query categories assertion
- assert:
- that:
- - query_categories.data is defined
-
- - name: Query content filtering policies
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- subset: policy
- state: query
- delegate_to: localhost
- register: query_policy
-
- - debug:
- var: query_policy
-
- - name: Query contnet filtering policy assertion
- assert:
- that:
- - query_policy.data is defined
-
- always:
- - name: Reset policies
- meraki_content_filtering:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- category_list_size: full list
- allowed_urls:
- -
- blocked_urls:
- -
diff --git a/test/integration/targets/meraki_device/aliases b/test/integration/targets/meraki_device/aliases
deleted file mode 100644
index 89aea537d1..0000000000
--- a/test/integration/targets/meraki_device/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported \ No newline at end of file
diff --git a/test/integration/targets/meraki_device/tasks/main.yml b/test/integration/targets/meraki_device/tasks/main.yml
deleted file mode 100644
index e0a973ab9b..0000000000
--- a/test/integration/targets/meraki_device/tasks/main.yml
+++ /dev/null
@@ -1,215 +0,0 @@
----
-- block:
- # This is commented out because a device cannot be unclaimed via API
- # - name: Claim a device into an organization
- # meraki_device:
- # auth_key: '{{auth_key}}'
- # org_name: '{{test_org_name}}'
- # serial: '{{serial}}'
- # state: present
- # delegate_to: localhost
- # register: claim_device_org
-
- # - assert:
- # that:
- # - claim_device_org.changed == true
-
- - name: Query status of all devices in an organization
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: query
- delegate_to: localhost
- register: query_device_org
-
- - debug:
- msg: '{{query_device_org}}'
-
- - name: Claim a device into a network
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial: '{{serial}}'
- state: present
- delegate_to: localhost
- register: claim_device
-
- - debug:
- msg: '{{claim_device}}'
-
- - assert:
- that:
- - claim_device.changed == true
-
- - name: Query all devices in one network by network ID
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_id: '{{test_net_id}}'
- state: query
- delegate_to: localhost
- register: query_one_net_id
-
- - debug:
- msg: '{{query_one_net_id}}'
-
- - name: Query all devices in one network
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- delegate_to: localhost
- register: query_one_net
-
- - debug:
- msg: '{{query_one_net}}'
-
- - name: Query device by serial
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- serial: '{{serial}}'
- state: query
- delegate_to: localhost
- register: query_serial_no_net
-
- - debug:
- msg: '{{query_serial_no_net}}'
-
- - name: Query device by serial
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial: '{{serial}}'
- state: query
- delegate_to: localhost
- register: query_serial
-
- - debug:
- msg: '{{query_serial}}'
-
- - assert:
- that:
- - query_serial.changed == False
-
- - name: Query uplink information for a device
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial_uplink: '{{serial}}'
- state: query
- delegate_to: localhost
- register: query_serial_uplink
-
- - debug:
- msg: '{{query_serial_uplink}}'
-
- - name: Query LLDP/CDP information about a device
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial_lldp_cdp: '{{serial}}'
- lldp_cdp_timespan: 6000
- state: query
- delegate_to: localhost
- register: query_serial_lldp_cdp
-
- - debug:
- msg: '{{query_serial_lldp_cdp}}'
-
- - name: Query a device by hostname
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- hostname: test-hostname
- state: query
- delegate_to: localhost
- register: query_hostname
-
- - debug:
- msg: '{{query_hostname}}'
-
- - name: Query a device by model
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- model: MR26
- state: query
- delegate_to: localhost
- register: query_model
-
- - debug:
- msg: '{{query_model}}'
-
- - name: Update a device
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial: '{{serial}}'
- name: mr26
- address: 1060 W. Addison St., Chicago, IL
- lat: 41.948038
- lng: -87.65568
- tags: recently-added
- state: present
- move_map_marker: True
- note: Test device notes
- delegate_to: localhost
- register: update_device
-
- - assert:
- that:
- - update_device.changed == true
- - update_device.data.0.notes == "Test device notes"
- - '"1060 W. Addison St., Chicago, IL" in update_device.data.0.address'
-
- - name: Update a device with idempotency
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial: '{{serial}}'
- name: mr26
- address: 1060 W. Addison St., Chicago, IL
- lat: 41.948038
- lng: -87.65568
- tags: recently-added
- state: present
- move_map_marker: True
- note: Test device notes
- delegate_to: localhost
- register: update_device_idempotent
-
- - debug:
- msg: '{{update_device_idempotent}}'
-
- - assert:
- that:
- - update_device_idempotent.changed == False
- - update_device_idempotent.data is defined
-
- always:
- - name: Remove a device from a network
- meraki_device:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- serial: '{{serial}}'
- state: absent
- delegate_to: localhost
- register: delete_device
-
- - debug:
- msg: '{{delete_device}}'
-
- - assert:
- that:
- - delete_device.changed == true \ No newline at end of file
diff --git a/test/integration/targets/meraki_firewalled_services/aliases b/test/integration/targets/meraki_firewalled_services/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_firewalled_services/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_firewalled_services/tasks/main.yml b/test/integration/targets/meraki_firewalled_services/tasks/main.yml
deleted file mode 100644
index 60aa04a963..0000000000
--- a/test/integration/targets/meraki_firewalled_services/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Test code for the Meraki Firewalled Services 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: Run test cases
- include: tests.yml ansible_connection=local
diff --git a/test/integration/targets/meraki_firewalled_services/tasks/tests.yml b/test/integration/targets/meraki_firewalled_services/tasks/tests.yml
deleted file mode 100644
index ec23edf221..0000000000
--- a/test/integration/targets/meraki_firewalled_services/tasks/tests.yml
+++ /dev/null
@@ -1,196 +0,0 @@
-# Test code for the Meraki modules
-# Copyright: (c) 2019, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Create network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- type: appliance
- register: create
-
- - set_fact:
- net_id: create.data.id
-
- - name: Set icmp service to blocked with check mode
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: ICMP
- access: blocked
- register: icmp_blocked_check
- check_mode: yes
-
- - debug:
- var: icmp_blocked_check
-
- - assert:
- that:
- - icmp_blocked_check.data is defined
- - icmp_blocked_check is changed
-
- - name: Set icmp service to blocked
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: ICMP
- access: blocked
- register: icmp_blocked
-
- - debug:
- var: icmp_blocked
-
- - assert:
- that:
- - icmp_blocked.data is defined
- - icmp_blocked is changed
-
- - name: Set icmp service to blocked with idempotency
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: ICMP
- access: blocked
- register: icmp_blocked_idempotent
-
- - debug:
- var: icmp_blocked_idempotent
-
- - assert:
- that:
- - icmp_blocked_idempotent.data is defined
- - icmp_blocked_idempotent is not changed
-
- - name: Set icmp service to restricted with check mode
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: web
- access: restricted
- allowed_ips:
- - 192.0.1.1
- - 192.0.1.2
- check_mode: yes
- register: web_restricted_check
-
- - debug:
- var: web_restricted_check
-
- - assert:
- that:
- - web_restricted_check.data is defined
- - web_restricted_check is changed
-
- - name: Set icmp service to restricted
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: web
- access: restricted
- allowed_ips:
- - 192.0.1.1
- - 192.0.1.2
- register: web_restricted
-
- - debug:
- var: web_restricted
-
- - assert:
- that:
- - web_restricted.data is defined
- - web_restricted is changed
-
- - name: Set icmp service to restricted with idempotency
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: web
- access: restricted
- allowed_ips:
- - 192.0.1.1
- - 192.0.1.2
- register: web_restricted_idempotent
-
- - debug:
- var: web_restricted_idempotent
-
- - assert:
- that:
- - web_restricted_idempotent.data is defined
- - web_restricted_idempotent is not changed
-
- - name: Test error for access restricted and allowed_ips
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: web
- access: unrestricted
- allowed_ips:
- - 192.0.1.1
- - 192.0.1.2
- register: access_error
- ignore_errors: yes
-
- - assert:
- that:
- - 'access_error.msg == "allowed_ips is only allowed when access is restricted."'
-
- - name: Query appliance services
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- register: query_appliance
-
- - debug:
- var: query_appliance
-
- - assert:
- that:
- - query_appliance.data is defined
-
- - name: Query services
- meraki_firewalled_services:
- auth_key: '{{ auth_key }}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- service: ICMP
- register: query_service
-
- - debug:
- var: query_service
-
- - assert:
- that:
- - query_service.data is defined
-
-#############################################################################
-# Tear down starts here
-#############################################################################
- always:
- - name: Delete all networks
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
diff --git a/test/integration/targets/meraki_malware/aliases b/test/integration/targets/meraki_malware/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_malware/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_malware/tasks/main.yml b/test/integration/targets/meraki_malware/tasks/main.yml
deleted file mode 100644
index b387479deb..0000000000
--- a/test/integration/targets/meraki_malware/tasks/main.yml
+++ /dev/null
@@ -1,247 +0,0 @@
-# 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- type: appliance
- delegate_to: localhost
- register: net
-
- - set_fact:
- net_id: '{{net.data.id}}'
-
- - name: Enable malware protection with check mode
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- delegate_to: localhost
- check_mode: yes
- register: get_malware_check
-
- - assert:
- that:
- - get_malware_check is changed
- - get_malware_check.data is defined
-
- - name: Enable malware protection
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- delegate_to: localhost
- register: get_malware
-
- - debug:
- var: get_malware
-
- - assert:
- that:
- - get_malware is changed
- - get_malware.data.mode is defined
-
- - name: Enable malware protection with idempotency
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- delegate_to: localhost
- register: get_malware_idempotent
-
- - debug:
- var: get_malware_idempotent
-
- - assert:
- that:
- - get_malware_idempotent is not changed
- - get_malware_idempotent.data is defined
-
- - name: Test error when mode is not set
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- allowed_files:
- - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
- comment: random zip
- delegate_to: localhost
- register: test_mode_err
- ignore_errors: yes
-
- - assert:
- that:
- - test_mode_err.msg == "mode must be set when allowed_files or allowed_urls is set."
-
- - name: Set whitelisted file with check mode
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- allowed_files:
- - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
- comment: random zip
- delegate_to: localhost
- check_mode: yes
- register: set_file_check
-
- - debug:
- var:
- set_file_check
-
- - assert:
- that:
- - set_file_check is changed
- - set_file_check.data is defined
-
- - name: Set whitelisted file
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- mode: enabled
- allowed_files:
- - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
- comment: random zip
- delegate_to: localhost
- register: set_file
-
- - debug:
- var: set_file
-
- - assert:
- that:
- - set_file is changed
- - set_file.data.mode is defined
-
- - name: Set whitelisted file with idempotency
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- allowed_files:
- - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
- comment: random zip
- delegate_to: localhost
- register: set_file_idempotent
-
- - debug:
- var: set_file_idempotent
-
- - assert:
- that:
- - set_file_idempotent is not changed
- - set_file_idempotent.data is defined
-
- - name: Set whitelisted url with check mode
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- allowed_urls:
- - url: www.google.com
- comment: Google
- delegate_to: localhost
- check_mode: yes
- register: set_url_check
-
- - debug:
- var:
- set_url_check
-
- - assert:
- that:
- - set_url_check is changed
- - set_url_check.data is defined
-
- - name: Set whitelisted url
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- allowed_urls:
- - url: www.google.com
- comment: Google
- delegate_to: localhost
- register: set_url
-
- - debug:
- var: set_url
-
- - assert:
- that:
- - set_url is changed
- - set_url.data.mode is defined
-
- - name: Set whitelisted url with idempotency
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- mode: enabled
- allowed_urls:
- - url: www.google.com
- comment: Google
- delegate_to: localhost
- register: set_url_idempotent
-
- - debug:
- var: set_url_idempotent
-
- - assert:
- that:
- - set_url_idempotent is not changed
- - set_url_idempotent.data is defined
-
- - name: Get malware settings
- meraki_malware:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- delegate_to: localhost
- register: get_malware
-
- - assert:
- that:
- - get_malware.data is defined
-
- #############################################################################
- # Tear down starts here
- #############################################################################
- always:
- - name: Delete test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}} - Malware'
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_mr_l3_firewall/aliases b/test/integration/targets/meraki_mr_l3_firewall/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_mr_l3_firewall/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_mr_l3_firewall/tasks/main.yml b/test/integration/targets/meraki_mr_l3_firewall/tasks/main.yml
deleted file mode 100644
index 75a110b285..0000000000
--- a/test/integration/targets/meraki_mr_l3_firewall/tasks/main.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the Meraki modules
-# Copyright: (c) 2018, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Create wireless network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetWireless
- type: wireless
- delegate_to: localhost
- register: new_net
-
- - set_fact:
- net: '{{new_net.data.id}}'
-
- - name: Create single firewall rule
- meraki_mr_l3_firewall:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{net}}'
- number: 1
- rules:
- - comment: Integration test rule
- policy: allow
- protocol: tcp
- dest_port: 80
- dest_cidr: 192.0.2.0/24
- allow_lan_access: no
- delegate_to: localhost
- register: create_one
-
- - debug:
- msg: '{{create_one}}'
-
- - assert:
- that:
- - create_one.data.0.comment == 'Integration test rule'
- - create_one.data.1.policy == 'deny'
- - create_one.data is defined
-
- - name: Enable local LAN access
- meraki_mr_l3_firewall:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{net}}'
- number: 1
- rules:
- allow_lan_access: yes
- delegate_to: localhost
- register: enable_lan
-
- - assert:
- that:
- - enable_lan.data.1.policy == 'allow'
-
- - name: Query firewall rules
- meraki_mr_l3_firewall:
- auth_key: '{{ auth_key }}'
- state: query
- org_name: '{{test_org_name}}'
- net_id: '{{net}}'
- number: 1
- delegate_to: localhost
- register: query
-
- - debug:
- msg: '{{query}}'
-
- - assert:
- that:
- - query.data.1.comment == 'Wireless clients accessing LAN'
- - query.data.2.comment == 'Default rule'
- - query.changed == False
-
-############################################################################
-# Tear down starts here
-############################################################################
- always:
- - name: Delete wireless SSID
- meraki_ssid:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_id: '{{net}}'
- number: 1
- delegate_to: localhost
-
- - name: Delete wireless network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_id: '{{net}}'
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_mx_l3_firewall/aliases b/test/integration/targets/meraki_mx_l3_firewall/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_mx_l3_firewall/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml b/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml
deleted file mode 100644
index cc70f9788c..0000000000
--- a/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml
+++ /dev/null
@@ -1,203 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create network
- meraki_network:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- type: appliance
- delegate_to: localhost
-
- - name: Query firewall rules
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: query
- delegate_to: localhost
- register: query
-
- - assert:
- that:
- - query.data|length == 1
-
- - name: Set one firewall rule
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - comment: Deny to documentation address
- src_port: any
- src_cidr: any
- dest_port: 80,443
- dest_cidr: 192.0.1.1/32
- protocol: tcp
- policy: deny
- delegate_to: localhost
- register: create_one
-
- - debug:
- var: create_one
-
- - assert:
- that:
- - create_one.data|length == 2
- - create_one.data.0.dest_cidr == '192.0.1.1/32'
- - create_one.data.0.protocol == 'tcp'
- - create_one.data.0.policy == 'deny'
- - create_one.changed == True
- - create_one.data is defined
-
- - name: Check for idempotency
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - comment: Deny to documentation address
- src_port: any
- src_cidr: any
- dest_port: 80,443
- dest_cidr: 192.0.1.1/32
- protocol: tcp
- policy: deny
- delegate_to: localhost
- register: create_one_idempotent
-
- - debug:
- msg: '{{create_one_idempotent}}'
-
- - assert:
- that:
- - create_one_idempotent.changed == False
- - create_one_idempotent.data is defined
-
- - name: Create syslog in network
- meraki_syslog:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- servers:
- - host: 192.0.2.10
- port: 514
- roles:
- - Appliance event log
- - Flows
- delegate_to: localhost
-
- - name: Enable syslog for default rule
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - comment: Deny to documentation address
- src_port: any
- src_cidr: any
- dest_port: 80,443
- dest_cidr: 192.0.1.1/32
- protocol: tcp
- policy: deny
- syslog_default_rule: yes
- delegate_to: localhost
- register: default_syslog
-
- - debug:
- msg: '{{default_syslog}}'
-
- - assert:
- that:
- - default_syslog.data is defined
-
- - name: Query firewall rules
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: query
- delegate_to: localhost
- register: query
-
- - debug:
- msg: '{{query.data.1}}'
-
- - assert:
- that:
- - query.data.1.syslog_enabled == True
- - default_syslog.changed == True
-
- - name: Disable syslog for default rule
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - comment: Deny to documentation address
- src_port: any
- src_cidr: any
- dest_port: 80,443
- dest_cidr: 192.0.1.1/32
- protocol: tcp
- policy: deny
- syslog_default_rule: no
- delegate_to: localhost
- register: disable_syslog
-
- - debug:
- msg: '{{disable_syslog}}'
-
- - assert:
- that:
- - disable_syslog.data is defined
-
- - name: Query firewall rules
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: query
- delegate_to: localhost
- register: query
-
- - debug:
- msg: '{{query.data.1}}'
-
- - assert:
- that:
- - query.data.1.syslog_enabled == False
- - disable_syslog.changed == True
-
- always:
- - name: Delete all firewall rules
- meraki_mx_l3_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules: []
- delegate_to: localhost
- register: delete_all
-
- - name: Delete network
- meraki_network:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: absent
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_mx_l7_firewall/aliases b/test/integration/targets/meraki_mx_l7_firewall/aliases
deleted file mode 100644
index 06fe32bc66..0000000000
--- a/test/integration/targets/meraki_mx_l7_firewall/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-unsupported
-
diff --git a/test/integration/targets/meraki_mx_l7_firewall/tasks/main.yml b/test/integration/targets/meraki_mx_l7_firewall/tasks/main.yml
deleted file mode 100644
index bb4c6fc594..0000000000
--- a/test/integration/targets/meraki_mx_l7_firewall/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Test code for the Meraki Organization 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: Run test cases
- include: tests.yml ansible_connection=local \ No newline at end of file
diff --git a/test/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml b/test/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml
deleted file mode 100644
index 72adef560e..0000000000
--- a/test/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml
+++ /dev/null
@@ -1,494 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create network
- meraki_network:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- type: appliance
-
- - name: Query firewall rules
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: query
- register: query
-
- - debug:
- var: query
-
- - assert:
- that:
- - query.data is defined
-
- - name: Query firewall application categories
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: query
- categories: yes
- register: query_categories
-
- - assert:
- that:
- - query_categories.data is defined
-
- - name: Create firewall rule for IP range in check mode
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range_check
- check_mode: yes
-
- - debug:
- var: create_ip_range_check
-
- - assert:
- that:
- - create_ip_range_check is changed
-
- - name: Create firewall rule for IP range
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range
-
- - debug:
- var: create_ip_range
-
- - assert:
- that:
- - create_ip_range is changed
- - create_ip_range.data.rules | length == 1
-
- - name: Create firewall rule for IP range with idempotency with check mode
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range_idempotent_check
- check_mode: yes
-
- - assert:
- that:
- - create_ip_range_idempotent_check is not changed
-
- - name: Create firewall rule for IP range with idempotency
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range_idempotent
-
- - assert:
- that:
- - create_ip_range_idempotent is not changed
-
- - name: Create firewall rule for IP and port
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.1:23
- register: create_ip_range_port
-
- - debug:
- var: create_ip_range_port
-
- - assert:
- that:
- - create_ip_range_port is changed
-
- - name: Create firewall rule for IP range
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range
-
- - debug:
- var: create_ip_range
-
- - assert:
- that:
- - create_ip_range is changed
- - create_ip_range.data.rules | length == 1
-
- - name: Create firewall rule for IP range with idempotency with check mode
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range_idempotent_check
- check_mode: yes
-
- - assert:
- that:
- - create_ip_range_idempotent_check is not changed
-
- - name: Create firewall rule for IP range with idempotency
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: ip_range
- ip_range: 10.11.12.0/24
- register: create_ip_range_idempotent
-
- - assert:
- that:
- - create_ip_range_idempotent is not changed
-
- - name: Create firewall rule for application
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application
- application:
- name: facebook
- register: application_rule
-
- - assert:
- that:
- - application_rule is changed
- - application_rule.data.rules is defined
-
- - name: Create firewall rule for application via ID
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application
- application:
- id: meraki:layer7/application/205
- register: application_rule_id
-
- - assert:
- that:
- - application_rule_id is changed
-
- - name: Create firewall rule for invalid application
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application
- application:
- name: ansible
- register: application_rule_invalid
- ignore_errors: yes
-
- - name: Create firewall rule for application category
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application_category
- application:
- name: Advertising
- register: application_category_rule
-
- - debug:
- var: application_category_rule
-
- - assert:
- that:
- - application_category_rule is changed
-
- - name: Create firewall rule for application category with ID and conflict
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application_category
- application:
- id: meraki:layer7/category/27
- register: application_category_rule_id_conflict
-
- - assert:
- that:
- - application_category_rule_id_conflict is not changed
-
- - name: Create firewall rule for application category with ID
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application_category
- application:
- id: meraki:layer7/category/24
- register: application_category_rule_id
-
- - assert:
- that:
- - application_category_rule_id is changed
-
- - name: Create firewall rule for host
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: host
- host: asdf.com
- register: host_rule
-
- - assert:
- that:
- - host_rule is changed
-
- - name: Create firewall rule for port
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: port
- port: 1234
- register: port_rule
-
- - assert:
- that:
- - port_rule is changed
-
- - name: Create firewall rule for blacklisted countries
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: blacklisted_countries
- countries:
- - CA
- - AX
- register: blacklist_countries
-
- - assert:
- that:
- - blacklist_countries is changed
-
- - name: Create firewall rule for whitelisted countries
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: whitelisted_countries
- countries:
- - US
- - FR
- register: whitelist_countries
-
- - assert:
- that:
- - whitelist_countries is changed
-
- - name: Create firewall rule for whitelisted countries with idempotency
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: whitelisted_countries
- countries:
- - US
- - FR
- register: whitelist_countries_idempotent
-
- - assert:
- that:
- - whitelist_countries_idempotent is not changed
-
- - name: Create multiple firewall rules
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application_category
- application:
- id: meraki:layer7/category/27
- - type: blacklisted_countries
- countries:
- - CN
- - policy: deny
- type: port
- port: 8080
- register: multiple_rules
-
- - debug:
- var: multiple_rules
-
- - assert:
- that:
- - multiple_rules.data.rules | length == 3
- - multiple_rules is changed
-
- #########################################
- ## Tests for argument completeness ##
- #########################################
-
- - name: Test whitelisted_countries incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: whitelisted_countries
- register: error_whitelist
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_whitelist.msg == "countries argument is required when type is whitelisted_countries."'
-
- - name: Test blacklisted_countries incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: blacklisted_countries
- register: error_blacklist
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_blacklist.msg == "countries argument is required when type is blacklisted_countries."'
-
- - name: Test application_category incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application_category
- register: error_app_cat
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_app_cat.msg == "application argument is required when type is application_category."'
-
- - name: Test application incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: application
- register: error_app_cat
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_app_cat.msg == "application argument is required when type is application."'
-
- - name: Test host incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: host
- register: error_app_cat
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_app_cat.msg == "host argument is required when type is host."'
-
- - name: Test port incomplete arguments
- meraki_mx_l7_firewall:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: TestNetAppliance
- state: present
- rules:
- - type: port
- register: error_app_cat
- ignore_errors: yes
-
- - assert:
- that:
- - 'error_app_cat.msg == "port argument is required when type is port."'
-
- #################
- ## Cleanup ##
- #################
-
- # always:
- # - name: Delete network
- # meraki_network:
- # auth_key: '{{ auth_key }}'
- # org_name: '{{test_org_name}}'
- # net_name: TestNetAppliance
- # state: absent
- # delegate_to: localhost
diff --git a/test/integration/targets/meraki_nat/tasks/main.yml b/test/integration/targets/meraki_nat/tasks/main.yml
deleted file mode 100644
index 721a93007b..0000000000
--- a/test/integration/targets/meraki_nat/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Test code for the Meraki Organization 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: Run test cases
- include: tests.yml ansible_connection=local
diff --git a/test/integration/targets/meraki_nat/tasks/tests.yml b/test/integration/targets/meraki_nat/tasks/tests.yml
deleted file mode 100644
index 11193d135e..0000000000
--- a/test/integration/targets/meraki_nat/tasks/tests.yml
+++ /dev/null
@@ -1,363 +0,0 @@
-# Test code for the Meraki NAT module
-# Copyright: (c) 2019, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Create test network
- meraki_network:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- type: appliance
-
- - name: Create 1:1 rule with check mode
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_one:
- - name: Service behind NAT
- public_ip: 1.2.1.2
- lan_ip: 192.168.128.1
- uplink: internet1
- allowed_inbound:
- - protocol: tcp
- destination_ports:
- - 80
- allowed_ips:
- - 10.10.10.10
- register: create_one_one_check
- check_mode: yes
-
- - debug:
- var: create_one_one_check
-
- - assert:
- that:
- - create_one_one_check is changed
-
- - name: Create 1:1 rule
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_one:
- - name: Service behind NAT
- public_ip: 1.2.1.2
- lan_ip: 192.168.128.1
- uplink: internet1
- allowed_inbound:
- - protocol: tcp
- destination_ports:
- - 80
- allowed_ips:
- - 10.10.10.10
- register: create_one_one
-
- - debug:
- var: create_one_one
-
- - assert:
- that:
- - create_one_one is changed
-
- - name: Create 1:1 rule with idempotency
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_one:
- - name: Service behind NAT
- public_ip: 1.2.1.2
- lan_ip: 192.168.128.1
- uplink: internet1
- allowed_inbound:
- - protocol: tcp
- destination_ports:
- - 80
- allowed_ips:
- - 10.10.10.10
- register: create_one_one_idempotent
-
- - debug:
- var: create_one_one_idempotent
-
- - assert:
- that:
- - create_one_one_idempotent is not changed
-
- - name: Create 1:many rule with check mode
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_many:
- - public_ip: 1.1.1.1
- uplink: internet1
- port_rules:
- - name: Test rule
- protocol: tcp
- public_port: 10
- local_ip: 192.168.128.1
- local_port: 11
- allowed_ips:
- - any
- register: create_one_many_check
- check_mode: yes
-
- - debug:
- var: create_one_many_check
-
- - assert:
- that:
- - create_one_many_check is changed
-
- - name: Create 1:many rule
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_many:
- - public_ip: 1.1.1.1
- uplink: internet1
- port_rules:
- - name: Test rule
- protocol: tcp
- public_port: 10
- local_ip: 192.168.128.1
- local_port: 11
- allowed_ips:
- - any
- register: create_one_many
-
- - debug:
- var: create_one_many
-
- - assert:
- that:
- - create_one_many is changed
-
- - name: Create 1:many rule with idempotency
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- one_to_many:
- - public_ip: 1.1.1.1
- uplink: internet1
- port_rules:
- - name: Test rule
- protocol: tcp
- public_port: 10
- local_ip: 192.168.128.1
- local_port: 11
- allowed_ips:
- - any
- register: create_one_many_idempotent
-
- - debug:
- var: create_one_many_idempotent
-
- - assert:
- that:
- - create_one_many_idempotent is not changed
-
- - name: Create port forwarding rule with check mode
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- port_forwarding:
- - name: Test map
- lan_ip: 192.168.128.1
- uplink: both
- protocol: tcp
- allowed_ips:
- - 1.1.1.1
- public_port: 10
- local_port: 11
- register: create_pf_check
- check_mode: yes
-
- - debug:
- var: create_pf_check
-
- - assert:
- that:
- - create_pf_check is changed
-
- - name: Create port forwarding rule
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- port_forwarding:
- - name: Test map
- lan_ip: 192.168.128.1
- uplink: both
- protocol: tcp
- allowed_ips:
- - 1.1.1.1
- public_port: 10
- local_port: 11
- register: create_pf
-
- - debug:
- var: create_pf
-
- - assert:
- that:
- - create_pf is changed
-
- - name: Create port forwarding rule with idempotency
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- port_forwarding:
- - name: Test map
- lan_ip: 192.168.128.1
- uplink: both
- protocol: tcp
- allowed_ips:
- - 1.1.1.1
- public_port: 10
- local_port: 11
- register: create_pf_idempotent
-
- - debug:
- var: create_pf_idempotent
-
- - assert:
- that:
- - create_pf_idempotent is not changed
- - create_pf_idempotent.data.port_forwarding is defined
-
- - name: Create multiple rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- port_forwarding:
- - name: Test map
- lan_ip: 192.168.128.1
- uplink: both
- protocol: tcp
- allowed_ips:
- - 1.1.1.2
- public_port: 10
- local_port: 11
- one_to_many:
- - public_ip: 1.1.1.3
- uplink: internet1
- port_rules:
- - name: Test rule
- protocol: tcp
- public_port: 10
- local_ip: 192.168.128.1
- local_port: 11
- allowed_ips:
- - any
- register: create_multiple
-
- - debug:
- var: create_multiple
-
- - assert:
- that:
- - create_multiple is changed
- - create_multiple.data.one_to_many is defined
- - create_multiple.data.port_forwarding is defined
-
- - assert:
- that:
- - create_multiple is changed
- - create_multiple.data.one_to_many is defined
- - create_multiple.data.port_forwarding is defined
- - create_multiple.diff.before.one_to_many is defined
- - create_multiple.diff.before.port_forwarding is defined
- - create_multiple.diff.after.one_to_many is defined
- - create_multiple.diff.after.port_forwarding is defined
-
- - name: Query all NAT rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset: all
- register: query_all
-
- - debug:
- var: query_all
-
- - name: Query 1:1 NAT rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset: '1:1'
- register: query_1to1
-
- - debug:
- var: query_1to1
-
- - name: Query 1:many NAT rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset: '1:many'
- register: query_1tomany
-
- - debug:
- var: query_1tomany
-
- - name: Query port forwarding rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset: port_forwarding
- register: query_pf
-
- - debug:
- var: query_pf
-
- - name: Query multiple rules
- meraki_nat:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- subset:
- - '1:1'
- - '1:many'
- register: query_multiple
-
- - debug:
- var: query_multiple
-
- always:
- - name: Delete test network
- meraki_network:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: absent
- \ No newline at end of file
diff --git a/test/integration/targets/meraki_network/aliases b/test/integration/targets/meraki_network/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_network/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_network/tasks/main.yml b/test/integration/targets/meraki_network/tasks/main.yml
deleted file mode 100644
index c81c7f9ab1..0000000000
--- a/test/integration/targets/meraki_network/tasks/main.yml
+++ /dev/null
@@ -1,402 +0,0 @@
-# Test code for the Meraki modules
-# Copyright: (c) 2018, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Create network without type
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- timezone: America/Chicago
- delegate_to: localhost
- register: create_net_no_type
- ignore_errors: yes
-
- - assert:
- that:
- - create_net_no_type.msg == 'type parameter is required when creating a network.'
-
- - name: Create network without organization
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- net_name: IntTestNetwork
- timezone: America/Chicago
- delegate_to: localhost
- register: create_net_no_org
- ignore_errors: yes
-
- - name: Create network with type switch
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkSwitch
- type: switch
- timezone: America/Chicago
- delegate_to: localhost
- register: create_net_switch
-
- - name: Create network with type switch by org ID
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_id: '{{test_org_id}}'
- net_name: IntTestNetworkSwitchOrgID
- type: switch
- timezone: America/Chicago
- delegate_to: localhost
- register: create_net_switch_org_id
-
- - name: Create network with type appliance and no timezone
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkAppliance
- type: appliance
- delegate_to: localhost
- register: create_net_appliance_no_tz
-
- - name: Enable VLAN support on appliance network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: IntTestNetworkAppliance
- enable_vlans: yes
- delegate_to: localhost
- register: enable_vlan
-
- - assert:
- that:
- - enable_vlan.data.enabled == True
-
- - name: Enable VLAN support on appliance network with idempotency
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: IntTestNetworkAppliance
- enable_vlans: yes
- delegate_to: localhost
- register: enable_vlan_idempotent
-
- - debug:
- var: enable_vlan_idempotent
-
- - assert:
- that:
- - enable_vlan_idempotent is not changed
- - enable_vlan_idempotent.data is defined
-
- - name: Disable VLAN support on appliance network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: IntTestNetworkAppliance
- enable_vlans: no
- delegate_to: localhost
- register: disable_vlan
-
- - assert:
- that:
- - disable_vlan.data.enabled == False
-
- - name: Disable VLAN support on appliance network with idempotency
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: IntTestNetworkAppliance
- enable_vlans: no
- delegate_to: localhost
- register: disable_vlan_idempotent
-
- - assert:
- that:
- - disable_vlan_idempotent is not changed
- - disable_vlan_idempotent.data is defined
-
- - name: Create network with type wireless and disable my.meraki.com
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkWireless
- type: wireless
- timezone: America/Chicago
- disable_my_meraki: yes
- delegate_to: localhost
- register: create_net_wireless
-
- - name: Create network with type wireless, disable my.meraki.com, and check for idempotency
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkWireless
- type: wireless
- timezone: America/Chicago
- disable_my_meraki: yes
- delegate_to: localhost
- register: create_net_wireless_idempotent
-
- - assert:
- that:
- - create_net_wireless_idempotent.data is defined
-
- - name: Create network with type combined and disable my.meraki.com
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{ test_org_name }}'
- net_name: IntTestNetworkCombined
- type:
- - appliance
- - switch
- timezone: America/Chicago
- enable_my_meraki: no
- delegate_to: localhost
- register: create_net_combined
-
- - name: Reenable my.meraki.com
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkCombined
- enable_my_meraki: yes
- delegate_to: localhost
- register: enable_meraki_com
-
- - name: Disable my.meraki.com for next test
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkCombined
- enable_my_meraki: no
- delegate_to: localhost
-
- - name: Enable remote status page
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkCombined
- enable_remote_status_page: yes
- delegate_to: localhost
- register: disable_remote_status
-
- - debug:
- msg: '{{disable_remote_status}}'
-
- - assert:
- that:
- - disable_remote_status.data.disable_remote_status_page == False
-
- - name: Disable remote status page
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkCombined
- enable_remote_status_page: no
- delegate_to: localhost
- register: enable_remote_status
-
- - debug:
- msg: '{{enable_remote_status}}'
-
- - assert:
- that:
- - enable_remote_status.data.disable_remote_status_page == True
-
- - name: Test status pages are mutually exclusive when on
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkCombined
- enable_my_meraki: yes
- enable_remote_status_page: no
- delegate_to: localhost
- register: status_exclusivity
- ignore_errors: yes
-
- - assert:
- that:
- - '"must be true when setting" in status_exclusivity.msg'
-
- - name: Create network with one tag
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkTag
- type: switch
- timezone: America/Chicago
- tags: first_tag
- delegate_to: localhost
- register: create_net_tag
-
- - name: Create network with two tags
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkTags
- type: switch
- timezone: America/Chicago
- tags:
- - first_tag
- - second_tag
- delegate_to: localhost
- register: create_net_tags
-
- - set_fact:
- tag_net_id: '{{create_net_tags.data.id}}'
-
- - name: Modify network by net_id
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_id: '{{tag_net_id}}'
- type: switch
- timezone: America/Chicago
- tags:
- - first_tag
- - second_tag
- - third_tag
- delegate_to: localhost
- register: create_net_modified
-
- - name: Modify network with idempotency
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkTags
- type: switch
- timezone: America/Chicago
- tags:
- - first_tag
- - second_tag
- - third_tag
- delegate_to: localhost
- register: create_net_modified_idempotent
-
- - assert:
- that:
- - create_net_modified_idempotent.data is defined
-
- - name: Present assertions
- assert:
- that:
- - create_net_combined.data.type == 'combined'
- - create_net_combined.data.disable_my_meraki_com == True
- - enable_meraki_com.data.disable_my_meraki_com == False
- - '"org_name or org_id parameters are required" in create_net_no_org.msg'
- - '"IntTestNetworkAppliance" in create_net_appliance_no_tz.data.name'
- - create_net_appliance_no_tz.changed == True
- - '"IntTestNetworkSwitch" in create_net_switch.data.name'
- - '"IntTestNetworkSwitchOrgID" in create_net_switch_org_id.data.name'
- - '"IntTestNetworkWireless" in create_net_wireless.data.name'
- - create_net_wireless.data.disable_my_meraki_com == True
- - create_net_wireless_idempotent.changed == False
- - create_net_wireless_idempotent.data is defined
- - '"first_tag" in create_net_tag.data.tags'
- - '"second_tag" in create_net_tags.data.tags'
- - '"third_tag" in create_net_modified.data.tags'
- - create_net_modified.changed == True
- - create_net_modified_idempotent.changed == False
- - create_net_modified_idempotent.data is defined
-
- - name: Query all networks
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: query
- org_name: '{{test_org_name}}'
- 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 }}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: IntTestNetworkSwitch
- delegate_to: localhost
- register: net_query_one
-
- - name: Query assertions
- assert:
- that:
- - 'net_query_one.data.name == "IntTestNetworkSwitch"'
- - 'query_config_template.data.name == "{{ test_template_name }}"'
-
-#############################################################################
-# Tear down starts here
-#############################################################################
- always:
- - name: Delete network without org
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- net_name: IntTestNetworkSwitch
- delegate_to: localhost
- register: delete_all_no_org
- ignore_errors: yes
-
- - name: Delete network by org ID
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_id: '{{test_org_id}}'
- net_name: IntTestNetworkSwitchOrgID
- delegate_to: localhost
- register: delete_net_org_id
-
- - name: Query after delete with org ID
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: query
- org_name: '{{test_org_name}}'
- delegate_to: localhost
- register: query_deleted_org_id
-
- - name: Delete all networks
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{ item }}'
- delegate_to: localhost
- register: delete_all
- ignore_errors: yes
- loop:
- - IntTestNetworkSwitch
- - IntTestNetworkWireless
- - IntTestNetworkAppliance
- - IntTestNetworkCombined
- - IntTestNetworkTag
- - IntTestNetworkTags
-
- - assert:
- that:
- - 'delete_all_no_org.msg == "org_name or org_id parameters are required"'
diff --git a/test/integration/targets/meraki_organization/aliases b/test/integration/targets/meraki_organization/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_organization/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_organization/tasks/main.yml b/test/integration/targets/meraki_organization/tasks/main.yml
deleted file mode 100644
index e7ad65b811..0000000000
--- a/test/integration/targets/meraki_organization/tasks/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Test code for the Meraki Organization 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: Run test cases
- include: tests.yml ansible_connection=local
- \ No newline at end of file
diff --git a/test/integration/targets/meraki_organization/tasks/tests.yml b/test/integration/targets/meraki_organization/tasks/tests.yml
deleted file mode 100644
index 75ba93c6b9..0000000000
--- a/test/integration/targets/meraki_organization/tasks/tests.yml
+++ /dev/null
@@ -1,127 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create a new organization named IntTestOrg
- meraki_organization:
- auth_key: '{{ auth_key }}'
- org_name: IntTestOrg
- state: present
- output_level: debug
- register: new_org
-
- - debug:
- msg: '{{new_org}}'
-
- - name: Clone IntTestOrg
- meraki_organization:
- auth_key: '{{ auth_key }}'
- clone: IntTestOrg
- org_name: IntTestOrgCloned
- state: present
- register: cloned_org
-
- - debug:
- msg: '{{cloned_org}}'
-
- - name: Rename IntTestOrg
- meraki_organization:
- auth_key: '{{ auth_key }}'
- org_name: IntTestOrgRenamed
- org_id: '{{ new_org.data.id }}'
- state: present
- register: modify_org
-
- - debug:
- msg: '{{ modify_org }}'
-
- - set_fact:
- renamed_org_id: '{{modify_org.data.id}}'
-
- - name: Rename IntTestOrg idempotent
- meraki_organization:
- auth_key: '{{ auth_key }}'
- org_name: IntTestOrgRenamed
- org_id: '{{ new_org.data.id }}'
- state: present
- register: modify_org_idempotent
-
- - name: Present assertions
- assert:
- that:
- - '"https" in new_org.url'
- - new_org.changed == True
- - new_org.data.id is defined
- - cloned_org.changed == True
- - cloned_org.data.id is defined
- - modify_org.changed == True
- - 'modify_org.data.name == "IntTestOrgRenamed"'
- - modify_org_idempotent.changed == False
- - modify_org_idempotent.data is defined
-
- - name: List all organizations
- meraki_organization:
- auth_key: '{{ auth_key }}'
- state: query
- register: query_all
-
- - name: Query information about a single organization named IntTestOrg
- meraki_organization:
- auth_key: '{{ auth_key }}'
- org_name: IntTestOrgRenamed
- state: query
- register: query_org
-
- - name: Query information about IntTestOrg by organization ID
- meraki_organization:
- auth_key: '{{ auth_key }}'
- org_id: '{{ query_org.data.id }}'
- state: query
- register: query_org_id
-
- - name: Query assertions
- assert:
- that:
- - query_org.data.id is defined
- - query_all.changed == False
- - query_all.data | length >= 1
- - 'query_org.data.name == "IntTestOrgRenamed"'
- - 'query_org_id.data.id == query_org.data.id'
-
- always:
- - name: Delete cloned organizations with check mode
- meraki_organization:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: IntTestOrgCloned
- register: deleted_org_check
- check_mode: yes
-
- - assert:
- that:
- - deleted_org_check is changed
-
- - name: Delete cloned organizations
- meraki_organization:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: IntTestOrgCloned
- register: deleted_org
-
- - name: Delete renamed organization by id
- meraki_organization:
- auth_key: '{{ auth_key }}'
- state: absent
- org_id: '{{renamed_org_id}}'
- register: deleted_org_id
-
- - assert:
- that:
- - deleted_org_id is changed
diff --git a/test/integration/targets/meraki_snmp/aliases b/test/integration/targets/meraki_snmp/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_snmp/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_snmp/tasks/main.yml b/test/integration/targets/meraki_snmp/tasks/main.yml
deleted file mode 100644
index d914dd0f64..0000000000
--- a/test/integration/targets/meraki_snmp/tasks/main.yml
+++ /dev/null
@@ -1,306 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create SNMP network
- meraki_network:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- type: appliance
- delegate_to: localhost
- register: new_net
-
- - set_fact:
- net_id: new_net.data.id
-
- - name: Query all SNMP settings
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: query
- delegate_to: localhost
- register: snmp_query
-
- - debug:
- msg: '{{snmp_query}}'
-
- - name: Enable SNMPv2c
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v2c_enabled: true
- delegate_to: localhost
- register: snmp_v2_enable
-
- - debug:
- msg: '{{snmp_v2_enable}}'
-
- - assert:
- that:
- - snmp_v2_enable.data.v2_community_string is defined
- - snmp_v2_enable.data.v2c_enabled == true
-
- - name: Disable SNMPv2c
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v2c_enabled: False
- delegate_to: localhost
- register: snmp_v2_disable
-
- - assert:
- that:
- - snmp_v2_disable.data.v2_community_string is not defined
- - snmp_v2_disable.data.v2c_enabled == False
-
- - name: Enable SNMPv2c with org_id
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_id: '{{test_org_id}}'
- state: present
- v2c_enabled: true
- delegate_to: localhost
- register: snmp_v2_enable_id
-
- - debug:
- msg: '{{snmp_v2_enable_id}}'
-
- - assert:
- that:
- - snmp_v2_enable_id.data.v2_community_string is defined
- - snmp_v2_enable_id.data.v2c_enabled == true
-
- - name: Disable SNMPv2c with org_id
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_id: '{{test_org_id}}'
- state: present
- v2c_enabled: False
- delegate_to: localhost
- register: snmp_v2_disable_id
-
- - assert:
- that:
- - snmp_v2_disable_id.data.v2_community_string is not defined
- - snmp_v2_disable_id.data.v2c_enabled == False
-
- - name: Enable SNMPv3 with check mode
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: true
- v3_auth_mode: SHA
- v3_auth_pass: ansiblepass
- v3_priv_mode: AES128
- v3_priv_pass: ansiblepass
- delegate_to: localhost
- check_mode: yes
- register: snmp_v3_enable_check
-
- - assert:
- that:
- - snmp_v3_enable_check.data.v3_enabled == True
- - snmp_v3_enable_check.changed == True
-
- - name: Enable SNMPv3
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: true
- v3_auth_mode: SHA
- v3_auth_pass: ansiblepass
- v3_priv_mode: AES128
- v3_priv_pass: ansiblepass
- delegate_to: localhost
- register: snmp_v3_enable
-
- - assert:
- that:
- - snmp_v3_enable.data.v3_enabled == True
- - snmp_v3_enable.changed == True
-
- - name: Check for idempotency
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: true
- v3_auth_mode: SHA
- v3_auth_pass: ansiblepass
- v3_priv_mode: AES128
- v3_priv_pass: ansiblepass
- delegate_to: localhost
- register: snmp_idempotent
-
- - debug:
- msg: '{{snmp_idempotent}}'
-
- - assert:
- that:
- - snmp_idempotent.changed == False
- - snmp_idempotent.data is defined
-
- - name: Add peer IPs
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: true
- v3_auth_mode: SHA
- v3_auth_pass: ansiblepass
- v3_priv_mode: AES128
- v3_priv_pass: ansiblepass
- peer_ips: 1.1.1.1;2.2.2.2
- delegate_to: localhost
- register: peers
-
- - debug:
- msg: '{{peers}}'
-
- - assert:
- that:
- - peers.data.peer_ips is defined
-
- - name: Add invalid peer IPs
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- peer_ips: 1.1.1.1 2.2.2.2
- delegate_to: localhost
- register: invalid_peers
- ignore_errors: yes
-
- - assert:
- that:
- '"Peer IP addresses are semi-colon delimited." in invalid_peers.msg'
-
- - name: Set short password
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: true
- v3_auth_mode: SHA
- v3_auth_pass: ansible
- v3_priv_mode: AES128
- v3_priv_pass: ansible
- peer_ips: 1.1.1.1;2.2.2.2
- delegate_to: localhost
- register: short_password
- ignore_errors: yes
-
- - debug:
- msg: '{{short_password}}'
-
- - assert:
- that:
- - '"at least 8" in short_password.msg'
-
- - name: Set network access type to community string
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- access: community
- community_string: abc123
- delegate_to: localhost
- register: set_net_community
-
- - debug:
- var: set_net_community
-
- - assert:
- that:
- - set_net_community is changed
- - set_net_community.data is defined
-
- - name: Set network access type to username
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- access: users
- users:
- - username: ansibleuser
- passphrase: ansiblepass
- delegate_to: localhost
- register: set_net_user
-
- - debug:
- var: set_net_user
-
- - assert:
- that:
- - set_net_user is changed
- - set_net_user.data is defined
-
- - name: Set network access type to none
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- access: none
- delegate_to: localhost
- register: set_net_none
-
- - debug:
- var: set_net_none
-
- - assert:
- that:
- - set_net_none is changed
- - set_net_none.data is defined
-
- - name: Query network SNMP settings
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- delegate_to: localhost
- register: get_net
-
- - debug:
- var: get_net
-
- - assert:
- that:
- - get_net.data is defined
-
- always:
- - name: Disable SNMPv3
- meraki_snmp:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- state: present
- v3_enabled: no
- v3_auth_mode: SHA
- v3_auth_pass: ansiblepass
- v3_priv_mode: AES128
- v3_priv_pass: ansiblepass
- delegate_to: localhost
-
- - name: Delete SNMP network
- meraki_network:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: absent
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_ssid/aliases b/test/integration/targets/meraki_ssid/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_ssid/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_ssid/tasks/main.yml b/test/integration/targets/meraki_ssid/tasks/main.yml
deleted file mode 100644
index 66291766cf..0000000000
--- a/test/integration/targets/meraki_ssid/tasks/main.yml
+++ /dev/null
@@ -1,408 +0,0 @@
-# Test code for the Meraki SSID 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- type: wireless
- register: test_net
-
- - debug:
- msg: '{{test_net}}'
-
- - name: Query all SSIDs
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- delegate_to: localhost
- register: query_all
-
- - name: Enable and name SSID
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- enabled: true
- delegate_to: localhost
- register: enable_name_ssid
-
- - debug:
- msg: '{{ enable_name_ssid }}'
-
- - assert:
- that:
- - query_all.data | length == 15
- - query_all.data.0.name == 'TestNetSSID WiFi'
- - enable_name_ssid.data.name == 'AnsibleSSID'
-
- - name: Check for idempotency
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- enabled: true
- delegate_to: localhost
- register: enable_name_ssid_idempotent
-
- - debug:
- msg: '{{ enable_name_ssid_idempotent }}'
-
- - assert:
- that:
- - enable_name_ssid_idempotent.changed == False
- - enable_name_ssid_idempotent.data is defined
-
- - name: Query one SSIDs
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- delegate_to: localhost
- register: query_one
-
- - debug:
- msg: '{{query_one}}'
-
- - assert:
- that:
- - query_one.data.name == 'AnsibleSSID'
-
- - name: Query one SSID with number
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- number: 1
- delegate_to: localhost
- register: query_one_number
-
- - debug:
- msg: '{{query_one_number}}'
-
- - assert:
- that:
- - query_one_number.data.name == 'AnsibleSSID'
-
- - name: Disable SSID without specifying number
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- enabled: false
- delegate_to: localhost
- register: disable_ssid
-
- - debug:
- msg: '{{ disable_ssid.data.enabled }}'
-
- - assert:
- that:
- - disable_ssid.data.enabled == False
-
- - name: Enable SSID with number
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- number: 1
- enabled: true
- delegate_to: localhost
- register: enable_ssid_number
-
- - debug:
- msg: '{{ enable_ssid_number.data.enabled }}'
-
- - assert:
- that:
- - enable_ssid_number.data.enabled == True
-
- - name: Set VLAN arg spec
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- number: 1
- use_vlan_tagging: yes
- ip_assignment_mode: Bridge mode
- default_vlan_id: 1
- ap_tags_vlan_ids:
- - tags: wifi
- vlan_id: 2
- delegate_to: localhost
- register: set_vlan_arg
-
- - debug:
- var: set_vlan_arg
-
- - assert:
- that: set_vlan_arg is changed
-
- - name: Set VLAN arg spec
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- number: 1
- use_vlan_tagging: yes
- ip_assignment_mode: Bridge mode
- default_vlan_id: 1
- ap_tags_vlan_ids:
- - tags: wifi
- vlan_id: 2
- delegate_to: localhost
- register: set_vlan_arg_idempotent
-
- - debug:
- var: set_vlan_arg_idempotent
-
- - assert:
- that: set_vlan_arg_idempotent is not changed
-
-
- - name: Set PSK
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: psk
- psk: abc1234567890
- encryption_mode: wpa
- delegate_to: localhost
- register: psk
-
- - debug:
- msg: '{{ psk }}'
-
- - assert:
- that:
- - psk.data.auth_mode == 'psk'
- - psk.data.encryption_mode == 'wpa'
- - psk.data.wpa_encryption_mode == 'WPA2 only'
-
- - name: Set PSK with idempotency
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: psk
- psk: abc1234567890
- encryption_mode: wpa
- delegate_to: localhost
- register: psk_idempotent
-
- - debug:
- msg: '{{ psk_idempotent }}'
-
- - assert:
- that:
- - psk_idempotent is not changed
-
- - name: Enable click-through splash page
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- splash_page: Click-through splash page
- delegate_to: localhost
- register: splash_click
-
- - debug:
- msg: '{{ splash_click }}'
-
- - assert:
- that:
- - splash_click.data.splash_page == 'Click-through splash page'
-
- - name: Configure RADIUS servers
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: open-with-radius
- radius_servers:
- - host: 192.0.1.200
- port: 1234
- secret: abc98765
- delegate_to: localhost
- register: set_radius_server
-
- - debug:
- msg: '{{ set_radius_server }}'
-
- - assert:
- that:
- - set_radius_server.data.radius_servers.0.host == '192.0.1.200'
-
- - name: Configure RADIUS servers with idempotency
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: open-with-radius
- radius_servers:
- - host: 192.0.1.200
- port: 1234
- secret: abc98765
- delegate_to: localhost
- register: set_radius_server_idempotent
-
- - debug:
- var: set_radius_server_idempotent
-
- - assert:
- that:
- - set_radius_server_idempotent is not changed
-
- #################
- # Error testing #
- #################
- - name: Set PSK with wrong mode
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: open
- psk: abc1234
- delegate_to: localhost
- register: psk_invalid
- ignore_errors: yes
-
- - debug:
- msg: '{{ psk_invalid }}'
-
- - assert:
- that:
- - psk_invalid.msg == 'PSK is only allowed when auth_mode is set to psk'
-
- - name: Set PSK with invalid encryption mode
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: psk
- psk: abc1234
- encryption_mode: eap
- delegate_to: localhost
- register: psk_invalid_mode
- ignore_errors: yes
-
- - debug:
- msg: '{{ psk_invalid_mode }}'
-
- - assert:
- that:
- - psk_invalid_mode.msg == 'PSK requires encryption_mode be set to wpa'
-
- - name: Error for PSK and RADIUS servers
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- auth_mode: psk
- radius_servers:
- - host: 192.0.1.200
- port: 1234
- secret: abc98765
- delegate_to: localhost
- register: err_radius_server_psk
- ignore_errors: yes
-
- - debug:
- var: err_radius_server_psk
-
- - assert:
- that:
- - 'err_radius_server_psk.msg == "radius_servers requires auth_mode to be open-with-radius or 8021x-radius"'
-
- - name: Set VLAN arg without default VLAN error
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- number: 1
- use_vlan_tagging: yes
- ip_assignment_mode: Bridge mode
- ap_tags_vlan_ids:
- - tags: wifi
- vlan_id: 2
- delegate_to: localhost
- register: set_vlan_arg_err
- ignore_errors: yes
-
- - debug:
- var: set_vlan_arg_err
-
- - assert:
- that:
- - 'set_vlan_arg_err.msg == "default_vlan_id is required when use_vlan_tagging is True"'
-
- always:
- - name: Delete SSID
- meraki_ssid:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- name: AnsibleSSID
- delegate_to: localhost
- register: delete_ssid
-
- - debug:
- msg: '{{ delete_ssid }}'
-
- - assert:
- that:
- - delete_ssid.data.name == 'Unconfigured SSID 2'
-
- - name: Delete test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: TestNetSSID
- register: delete_net
-
- - debug:
- msg: '{{delete_net}}'
diff --git a/test/integration/targets/meraki_static_route/aliases b/test/integration/targets/meraki_static_route/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_static_route/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_static_route/tasks/main.yml b/test/integration/targets/meraki_static_route/tasks/main.yml
deleted file mode 100644
index 10ba31eab9..0000000000
--- a/test/integration/targets/meraki_static_route/tasks/main.yml
+++ /dev/null
@@ -1,170 +0,0 @@
-# Test code for the Meraki modules
-# Copyright: (c) 2018, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Create appliance network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- timezone: America/Chicago
- type: appliance
- delegate_to: localhost
- register: net
-
- - set_fact:
- net_id: '{{net.data.id}}'
-
- - name: Initialize static route id list
- set_fact:
- route_ids: []
-
- - name: Create static_route
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- name: Test Route
- subnet: 192.0.1.0/24
- gateway_ip: 192.168.128.1
- delegate_to: localhost
- register: create_route
-
- - set_fact:
- route_ids: "{{ route_ids + [create_route.data.id] }}"
-
- - name: Create second static_route
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- name: Test Route 2
- subnet: 192.0.2.0/24
- gateway_ip: 192.168.128.1
- delegate_to: localhost
- register: second_create
-
- - set_fact:
- route_ids: "{{ route_ids + [second_create.data.id] }}"
-
- - assert:
- that:
- - create_route.changed == True
- - create_route.data.id is defined
-
- - name: Update static route
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- route_id: '{{create_route.data.id}}'
- subnet: 192.0.3.0/24
- enabled: yes
- delegate_to: localhost
- register: update
-
- - assert:
- that:
- - update.data.subnet == "192.0.3.0/24"
-
- - name: Query static routes
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- delegate_to: localhost
- register: query_all
-
- - debug:
- var: query_all
-
- - assert:
- that:
- - query_all.data | length >= 2
-
- - name: Update static route with idempotency
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- route_id: '{{create_route.data.id}}'
- name: Test Route
- gateway_ip: 192.168.128.1
- subnet: 192.0.3.0/24
- enabled: yes
- delegate_to: localhost
- register: update_idempotent
-
- - assert:
- that:
- - update_idempotent.changed == False
- - update_idempotent.data is defined
-
- - name: Update static route with fixed IP assignment and reservation
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- route_id: '{{create_route.data.id}}'
- fixed_ip_assignments:
- - mac: aa:bb:cc:dd:ee:ff
- ip: 192.0.3.11
- name: WebServer
- reserved_ip_ranges:
- - start: 192.168.3.2
- end: 192.168.3.10
- comment: Printers
- delegate_to: localhost
- register: fixed_ip
-
- - debug:
- var: fixed_ip
-
- - assert:
- that:
- - fixed_ip.data.fixedIpAssignments | length == 1
- - fixed_ip.data.reservedIpRanges | length == 1
-
-
- - name: Query single static route
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- route_id: '{{create_route.data.id}}'
- delegate_to: localhost
- register: query_one
-
- - assert:
- that:
- - query_one.data.name == "Test Route"
-
- - name: Delete static routes
- meraki_static_route:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- route_id: '{{item}}'
- delegate_to: localhost
- loop: '{{route_ids}}'
- register: delete_all
-
- always:
- - name: Delete appliance network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: IntTestNetwork
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_switchport/aliases b/test/integration/targets/meraki_switchport/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_switchport/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_switchport/tasks/main.yml b/test/integration/targets/meraki_switchport/tasks/main.yml
deleted file mode 100644
index 8146f2845c..0000000000
--- a/test/integration/targets/meraki_switchport/tasks/main.yml
+++ /dev/null
@@ -1,297 +0,0 @@
-# Test code for the Meraki Organization 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
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
-- name: Query all switchports
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: query
- serial: Q2HP-2C6E-GTLD
- delegate_to: localhost
- register: query_all
-
-- debug:
- msg: '{{query_all}}'
-
-- name: Query one switchport
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: query
- serial: Q2HP-2C6E-GTLD
- number: 1
- delegate_to: localhost
- register: query_one
-
-- debug:
- msg: '{{query_one}}'
-
-- name: Enable switchport
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- delegate_to: localhost
- register: update_port_true
-
-- debug:
- msg: '{{update_port_true}}'
-
-- assert:
- that:
- - update_port_true.data.enabled == True
-
-- name: Disable switchport
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: false
- delegate_to: localhost
- register: update_port_false
-
-- debug:
- msg: '{{update_port_false}}'
-
-- assert:
- that:
- - update_port_false.data.enabled == False
-
-
-- name: Name switchport
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- name: Test Port
- delegate_to: localhost
- register: update_port_name
-
-- debug:
- msg: '{{update_port_name}}'
-
-- assert:
- that:
- - update_port_name.data.name == 'Test Port'
-
-- name: Configure access port
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Test Port
- tags: desktop
- type: access
- vlan: 10
- delegate_to: localhost
- register: update_access_port
-
-- debug:
- msg: '{{update_access_port}}'
-
-- assert:
- that:
- - update_access_port.data.vlan == 10
-
-- name: Configure port as trunk
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 8
- enabled: true
- name: Test Port
- type: trunk
- vlan: 10
- allowed_vlans: 10, 100, 200
- delegate_to: localhost
-
-- name: Convert trunk port to access
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 8
- enabled: true
- name: Test Port
- type: access
- vlan: 10
- delegate_to: localhost
-
-- name: Test converted port for idempotency
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 8
- enabled: true
- name: Test Port
- type: access
- vlan: 10
- delegate_to: localhost
- register: convert_idempotent
-
-- assert:
- that:
- - convert_idempotent.changed == False
-
-- name: Configure access port with voice VLAN
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Test Port
- tags: desktop
- type: access
- vlan: 10
- voice_vlan: 11
- delegate_to: localhost
- register: update_port_vvlan
-
-- debug:
- msg: '{{update_port_vvlan}}'
-
-- assert:
- that:
- - update_port_vvlan.data.voice_vlan == 11
- - update_port_vvlan.changed == True
-
-- name: Check access port for idempotenty
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Test Port
- tags: desktop
- type: access
- vlan: 10
- voice_vlan: 11
- delegate_to: localhost
- register: update_port_access_idempotent
-
-- debug:
- msg: '{{update_port_access_idempotent}}'
-
-- assert:
- that:
- - update_port_access_idempotent.changed == False
- - update_port_access_idempotent.data is defined
-
-- name: Configure trunk port
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Server port
- tags: server
- type: trunk
- allowed_vlans: all
- vlan: 8
- delegate_to: localhost
- register: update_trunk
-
-- debug:
- msg: '{{update_trunk}}'
-
-- assert:
- that:
- - update_trunk.data.tags == 'server'
- - update_trunk.data.type == 'trunk'
- - update_trunk.data.allowed_vlans == 'all'
-
-- name: Configure trunk port with specific VLANs
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Server port
- tags: server
- type: trunk
- vlan: 8
- allowed_vlans:
- - 10
- - 15
- - 20
- delegate_to: localhost
- register: update_trunk
-
-- debug:
- msg: '{{update_trunk}}'
-
-- assert:
- that:
- - update_trunk.data.tags == 'server'
- - update_trunk.data.type == 'trunk'
- - update_trunk.data.allowed_vlans == '8,10,15,20'
-
-- name: Configure trunk port with specific VLANs and native VLAN
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Server port
- tags: server
- type: trunk
- vlan: 2
- allowed_vlans:
- - 10
- - 15
- - 20
- delegate_to: localhost
- register: update_trunk
-
-- debug:
- msg: '{{update_trunk}}'
-
-- assert:
- that:
- - update_trunk.data.tags == 'server'
- - update_trunk.data.type == 'trunk'
- - update_trunk.data.allowed_vlans == '2,10,15,20'
-
-- name: Check for idempotency on trunk port
- meraki_switchport:
- auth_key: '{{auth_key}}'
- state: present
- serial: Q2HP-2C6E-GTLD
- number: 7
- enabled: true
- name: Server port
- tags: server
- type: trunk
- vlan: 2
- allowed_vlans:
- - 10
- - 15
- - 20
- delegate_to: localhost
- register: update_trunk_idempotent
-
-- debug:
- msg: '{{update_trunk_idempotent}}'
-
-- assert:
- that:
- - update_trunk_idempotent.changed == False
- - update_trunk_idempotent.data is defined
diff --git a/test/integration/targets/meraki_syslog/tasks/main.yml b/test/integration/targets/meraki_syslog/tasks/main.yml
deleted file mode 100644
index e2fdd6c8db..0000000000
--- a/test/integration/targets/meraki_syslog/tasks/main.yml
+++ /dev/null
@@ -1,169 +0,0 @@
-# Test code for the Meraki Organization 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - set_fact:
- syslog_test_net_name: 'syslog_{{test_net_name}}'
-
- - name: Create network with type appliance and no timezone
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- type: appliance
- delegate_to: localhost
- register: new_net
-
- - set_fact:
- net_id: '{{new_net.data.id}}'
-
- - name: Query syslog settings
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- delegate_to: localhost
- register: query_all
-
- - debug:
- msg: '{{query_all}}'
-
- - name: Set syslog server
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- servers:
- - host: 192.0.1.2
- port: 514
- roles:
- - Appliance event log
- delegate_to: localhost
- register: create_server
-
- - debug:
- msg: '{{create_server.data}}'
-
- - assert:
- that:
- - create_server['data'][0]['host'] == "192.0.1.2"
-
- - name: Set syslog server with idempotency
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- servers:
- - host: 192.0.1.2
- port: 514
- roles:
- - Appliance event log
- delegate_to: localhost
- register: create_server_idempotency
-
- - debug:
- msg: '{{create_server_idempotency}}'
-
- - assert:
- that:
- - create_server_idempotency.changed == False
- - create_server_idempotency.data is defined
-
- - name: Set multiple syslog servers
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_id: '{{net_id}}'
- state: present
- servers:
- - host: 192.0.1.3
- port: 514
- roles:
- - Appliance event log
- - host: 192.0.1.4
- port: 514
- roles:
- - Appliance Event log
- - Flows
- - host: 192.0.1.5
- port: 514
- roles:
- - Flows
- delegate_to: localhost
- register: create_multiple_servers
-
- - debug:
- msg: '{{create_multiple_servers}}'
-
- - assert:
- that:
- - create_multiple_servers['data'][0]['host'] == "192.0.1.3"
- - create_multiple_servers['data'][1]['host'] == "192.0.1.4"
- - create_multiple_servers['data'][2]['host'] == "192.0.1.5"
- - create_multiple_servers['data'] | length == 3
-
- - name: Create syslog server with bad name
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- servers:
- - host: 192.0.1.6
- port: 514
- roles:
- - Invalid role
- delegate_to: localhost
- register: invalid_role
- ignore_errors: yes
-
- # - debug:
- # msg: '{{invalid_role.body.errors.0}}'
-
- - assert:
- that:
- - '"Please select at least one valid role" in invalid_role.body.errors.0'
-
- - name: Add role to existing syslog server # Adding doesn't work, just creation
- meraki_syslog:
- auth_key: '{{auth_key}}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: present
- servers:
- - host: 192.0.1.2
- port: 514
- roles:
- - flows
- delegate_to: localhost
- register: add_role
-
- - debug:
- msg: '{{add_role.data.0.roles}}'
-
- - assert:
- that:
- - add_role.data.0.roles.0 == 'Flows'
- # - add_role.data.0.roles | length == 2
-
- always:
- - name: Delete syslog test network
- meraki_network:
- auth_key: '{{ auth_key }}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- delegate_to: localhost
- register: delete_all
- ignore_errors: yes
diff --git a/test/integration/targets/meraki_vlan/aliases b/test/integration/targets/meraki_vlan/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_vlan/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_vlan/tasks/main.yml b/test/integration/targets/meraki_vlan/tasks/main.yml
deleted file mode 100644
index 0f3cd233a8..0000000000
--- a/test/integration/targets/meraki_vlan/tasks/main.yml
+++ /dev/null
@@ -1,412 +0,0 @@
-# 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)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Test play without auth_key
- meraki_network:
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- type: appliance
- delegate_to: localhost
- ignore_errors: yes
- register: no_key
-
- - assert:
- that:
- - '"missing required arguments" in no_key.msg'
-
- - name: Create test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- type: appliance
- delegate_to: localhost
-
- - name: Enable VLANs on network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- enable_vlans: yes
- delegate_to: localhost
-
- - name: Create VLAN in check mode
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.1
- delegate_to: localhost
- register: create_vlan_check
- check_mode: yes
-
- - debug:
- var: create_vlan_check
-
- - assert:
- that:
- - create_vlan_check is changed
-
- - name: Create VLAN
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.1
- delegate_to: localhost
- register: create_vlan
- environment:
- ANSIBLE_MERAKI_FORMAT: camelcase
-
- - debug:
- msg: '{{create_vlan}}'
-
- - assert:
- that:
- - create_vlan.data.id == 2
- - create_vlan.changed == True
- - create_vlan.data.networkId is defined
-
- - name: Update VLAN with check mode
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_check
- check_mode: yes
-
- - debug:
- var: update_vlan_check
-
- - assert:
- that:
- - update_vlan_check is changed
-
- - name: Update VLAN
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan
-
- - debug:
- msg: '{{update_vlan}}'
-
- - assert:
- that:
- - update_vlan.data.appliance_ip == '192.168.250.2'
- - update_vlan.changed == True
-
- - name: Update VLAN with idempotency and check mode
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_idempotent_check
- check_mode: yes
-
- - debug:
- var: update_vlan_idempotent_check
-
- - assert:
- that:
- - update_vlan_idempotent_check is not changed
-
- - name: Update VLAN with idempotency
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_idempotent
-
- - debug:
- msg: '{{update_vlan_idempotent}}'
-
- - assert:
- that:
- - update_vlan_idempotent.changed == False
- - update_vlan_idempotent.data is defined
-
- - name: Add IP assignments and reserved IP ranges
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- - mac: "12:34:56:78:90:12"
- ip: 192.168.250.11
- name: another_fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- - start: 192.168.250.100
- end: 192.168.250.120
- comment: reserved_range_high
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_add_ip
-
- - debug:
- msg: '{{update_vlan_add_ip}}'
-
- - assert:
- that:
- - update_vlan_add_ip.changed == True
- - update_vlan_add_ip.data.fixed_ip_assignments | length == 2
- - update_vlan_add_ip.data.reserved_ip_ranges | length == 2
-
- - name: Remove IP assignments and reserved IP ranges
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_remove_ip
-
- - debug:
- msg: '{{update_vlan_remove_ip}}'
-
- - assert:
- that:
- - update_vlan_remove_ip.changed == True
- - update_vlan_remove_ip.data.fixed_ip_assignments | length == 1
- - update_vlan_remove_ip.data.reserved_ip_ranges | length == 1
-
- - name: Update VLAN with idempotency
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: opendns
- delegate_to: localhost
- register: update_vlan_idempotent
-
- - debug:
- msg: '{{update_vlan_idempotent}}'
-
- - assert:
- that:
- - update_vlan_idempotent.changed == False
- - update_vlan_idempotent.data is defined
-
- - name: Update VLAN with list of DNS entries
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- name: TestVLAN
- subnet: 192.168.250.0/24
- appliance_ip: 192.168.250.2
- fixed_ip_assignments:
- - mac: "13:37:de:ad:be:ef"
- ip: 192.168.250.10
- name: fixed_ip
- reserved_ip_range:
- - start: 192.168.250.10
- end: 192.168.250.20
- comment: reserved_range
- dns_nameservers: 1.1.1.1;8.8.8.8
- delegate_to: localhost
- register: update_vlan_dns_list
-
- - debug:
- msg: '{{update_vlan_dns_list}}'
-
- - assert:
- that:
- - '"1.1.1.1" in update_vlan_dns_list.data.dns_nameservers'
- - update_vlan_dns_list.changed == True
-
- - name: Query all VLANs in network
- meraki_vlan:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- state: query
- delegate_to: localhost
- register: query_vlans
-
- - debug:
- msg: '{{query_vlans}}'
-
- - assert:
- that:
- - query_vlans.data | length >= 2
- - query_vlans.data.1.id == 2
- - query_vlans.changed == False
-
- - name: Query single VLAN
- meraki_vlan:
- auth_key: '{{ auth_key }}'
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- state: query
- output_level: debug
- delegate_to: localhost
- register: query_vlan
-
- - debug:
- msg: '{{query_vlan}}'
-
- - assert:
- that:
- - query_vlan.data.id == 2
- - query_vlan.changed == False
-
- always:
- #############################################################################
- # Tear down starts here
- #############################################################################
- - name: Delete VLAN with check mode
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- delegate_to: localhost
- register: delete_vlan_check
- check_mode: yes
-
- - assert:
- that:
- delete_vlan_check is changed
-
- - name: Delete VLAN
- meraki_vlan:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- vlan_id: 2
- delegate_to: localhost
- register: delete_vlan
-
- - debug:
- msg: '{{delete_vlan}}'
-
- - name: Delete test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- delegate_to: localhost
diff --git a/test/integration/targets/meraki_webhook/aliases b/test/integration/targets/meraki_webhook/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/meraki_webhook/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/meraki_webhook/tasks/main.yml b/test/integration/targets/meraki_webhook/tasks/main.yml
deleted file mode 100644
index f671fc9287..0000000000
--- a/test/integration/targets/meraki_webhook/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Test code for the Meraki Webhooks 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: Run test cases
- include: tests.yml ansible_connection=local
diff --git a/test/integration/targets/meraki_webhook/tasks/tests.yml b/test/integration/targets/meraki_webhook/tasks/tests.yml
deleted file mode 100644
index c16caba0cc..0000000000
--- a/test/integration/targets/meraki_webhook/tasks/tests.yml
+++ /dev/null
@@ -1,273 +0,0 @@
-# Test code for the Meraki Webhook module
-# Copyright: (c) 2019, Kevin Breit (@kbreit)
-
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
----
-- block:
- - name: Test an API key is provided
- fail:
- msg: Please define an API key
- when: auth_key is not defined
-
- - name: Create test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- type: appliance
-
- - name: Create webhook with check mode
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyone
- check_mode: yes
- register: create_one_check
-
- - debug:
- var: create_one_check
-
- - assert:
- that:
- - create_one_check is changed
- - create_one_check.data is defined
-
- - name: Create webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyone
- register: create_one
-
- - debug:
- var: create_one
-
- - assert:
- that:
- - create_one is changed
- - create_one.data is defined
-
- - set_fact:
- webhook_id: '{{create_one.data.id}}'
-
- - name: Query one webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- register: query_one
-
- - debug:
- var: query_one
-
- - assert:
- that:
- - query_one.data is defined
-
- - name: Query one webhook with id
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- webhook_id: '{{webhook_id}}'
- register: query_one_id
-
- - debug:
- var: query_one_id
-
- - assert:
- that:
- - query_one_id.data is defined
-
- - name: Update webhook with check mode
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyonehere
- check_mode: yes
- register: update_check
-
- - assert:
- that:
- - update_check is changed
- - update_check.data is defined
-
- - name: Update webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyonehere
- register: update
-
- - debug:
- var: update
-
- - assert:
- that:
- - update is changed
- - update.data is defined
-
- - name: Update webhook with idempotency
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyonehere
- register: update_idempotent
-
- - debug:
- var: update_idempotent
-
- - assert:
- that:
- - update_idempotent is not changed
- - update_idempotent.data is defined
-
- - name: Update webhook with id
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- webhook_id: '{{webhook_id}}'
- name: Test_Hook
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- shared_secret: shhhdonttellanyonehereid
- register: update_id
-
- - debug:
- var: update_id
-
- - assert:
- that:
- - update_id is changed
- - update_id.data is defined
-
- - name: Test webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- test: test
- url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
- register: webhook_test
-
- - debug:
- var: webhook_test
-
- - set_fact:
- test_id: '{{webhook_test.data.id}}'
-
- - name: Get webhook status
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: present
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- test: status
- test_id: '{{test_id}}'
- register: webhook_test_status
-
- - debug:
- var: webhook_test_status
-
- - assert:
- that:
- - webhook_test_status.data is defined
-
- - name: Query all webhooks
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: query
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- register: query_all
-
- - debug:
- var: query_all
-
- - name: Delete webhook invalid webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook_Invalid
- check_mode: yes
- register: delete_invalid
- ignore_errors: yes
-
- - debug:
- var: delete_invalid
-
- - assert:
- that:
- - 'delete_invalid.msg == "There is no webhook with the name Test_Hook_Invalid"'
-
- - name: Delete webhook in check mode
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- check_mode: yes
- register: delete_check
-
- - debug:
- var: delete_check
-
- - assert:
- that:
- - delete_check is changed
-
- - name: Delete webhook
- meraki_webhook:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'
- name: Test_Hook
- register: delete
-
- - debug:
- var: delete
-
- - assert:
- that:
- - delete is changed
-
- always:
- #############################################################################
- # Tear down starts here
- #############################################################################
- - name: Delete test network
- meraki_network:
- auth_key: '{{auth_key}}'
- state: absent
- org_name: '{{test_org_name}}'
- net_name: '{{test_net_name}}'