-
Notifications
You must be signed in to change notification settings - Fork 1
/
vlan.yml
36 lines (31 loc) · 848 Bytes
/
vlan.yml
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
---
- name: Meraki Playbook to create a VLAN
hosts: localhost
gather_facts: false
vars:
new_vlan_id: 700
subnet_name: JT_Test_Subnet
subnet_cidr: 10.10.220.0/24
gateway_ip: 10.10.220.1
tasks:
- name: Query all VLANs in a network.
meraki_vlan:
host: "{{ api_address }}"
org_name: "{{ org_name }}"
net_name: "{{ net_name }}"
state: query
register: VLAN
delegate_to: localhost
- name: Display VLANs
debug:
var: VLAN
- name: Create a VLAN.
meraki_vlan:
org_name: "{{ org_name }}"
net_name: "{{ net_name }}"
state: present
vlan_id: "{{ new_vlan_id }}"
name: "{{ subnet_name }}"
subnet: "{{ subnet_cidr }}"
appliance_ip: "{{ gateway_ip }}"
delegate_to: localhost