blob: 80314a1c1f49c365187735da0b9c2b60915f15c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
---
# This playbook will create 3 WiFi networks across all networks in a given Meraki organization:
# 1. Corporate (802.1x) on vlan 100
# 2. Mobile (WPA-PSK) on vlan 200
# 3. Guests (Portal) on vlan 300
- hosts: localhost
vars_files:
- credentials.yml
vars:
org_id: "828099381482762270"
corp_name: "Umbrella Corp"
gather_facts: false
tasks:
- name: Get Organization Networks
cisco.meraki.networks_info:
organizationId: "{{ org_id }}"
register: result
- name: Filter networks with "wireless" productTypes
set_fact:
filtered_networks: "{{ result.meraki_response | selectattr('productTypes', 'contains', 'wireless') | list }}"
- name: Create corporate SSID
cisco.meraki.networks_wireless_ssids:
state: present
enabled: true
name: "{{corp_name}}"
networkId: "{{ item.id }}"
number: 1
ipAssignmentMode: Bridge mode
defaultVlanId: 100
useVlanTagging: true
authMode: "8021x-radius"
radiusServers:
- one:
host: "1.2.3.4"
port: 1812
secret: SuperSecretPassword
loop: "{{ filtered_networks }}"
loop_control:
label: "{{ item.id }}"
- name: Create Mobile/PSK SSID
cisco.meraki.networks_wireless_ssids:
state: present
enabled: true
name: "{{corp_name}}-legacy"
networkId: "{{ item.id }}"
number: 2
ipAssignmentMode: Bridge mode
defaultVlanId: 200
useVlanTagging: true
authMode: psk
encryptionMode: wpa
psk: SuperSecretPreSharedKey
loop: "{{ filtered_networks }}"
loop_control:
label: "{{ item.id }}"
- name: Create Guest SSID
cisco.meraki.networks_wireless_ssids:
state: present
enabled: true
name: "{{corp_name}}-Guests"
networkId: "{{ item.id }}"
number: 3
ipAssignmentMode: Bridge mode
defaultVlanId: 300
useVlanTagging: true
authMode: "open"
splashPage: Click-through splash page
loop: "{{ filtered_networks }}"
loop_control:
label: "{{ item.id }}"
|