diff options
Diffstat (limited to 'ansible_collections/cisco/meraki/playbooks/wifi_deployment.yml')
-rw-r--r-- | ansible_collections/cisco/meraki/playbooks/wifi_deployment.yml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/ansible_collections/cisco/meraki/playbooks/wifi_deployment.yml b/ansible_collections/cisco/meraki/playbooks/wifi_deployment.yml new file mode 100644 index 000000000..80314a1c1 --- /dev/null +++ b/ansible_collections/cisco/meraki/playbooks/wifi_deployment.yml @@ -0,0 +1,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 }}" |