blob: 02e2c7cd977728710314c49c49402c07daaa3558 (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
---
- hosts: localhost
vars:
network_id: "L_828099381482771185" # Branch-1234
org_id: "828099381482762270"
gather_facts: false
tasks:
# - name: Get all networks _appliance _ports
# cisco.meraki.networks_appliance_ports_info:
# networkId: L_828099381482771185
# register: result
# - name: update port
# cisco.meraki.devices_switch_ports:
# meraki_suppress_logging: false
# serial: QBSB-BNH2-KDXJ
# portId: 3
# vlan: 50
# # type: access
# state: present
# poeEnabled: false
# - name: Update appliance Vlans
# cisco.meraki.networks_appliance_vlans:
# state: present
# applianceIp: 192.168.1.2
# cidr: 192.168.1.0/24
# id: '1234'
# name: My VLAN
# networkId: "{{network_id}}"
# subnet: 192.168.1.0/24
# - name: Get all networks _appliance _ssids
# cisco.meraki.networks_appliance_ssids_info:
# networkId: "{{network_id}}"
# register: result
# - name: Show result
# ansible.builtin.debug:
# msg: "{{ result }}"
# - name: Update appliance SSID
# cisco.meraki.networks_appliance_ssids:
# state: present
# authMode: 8021x-radius
# defaultVlanId: 10
# enabled: true
# name: My SSID
# networkId: "{{network_id}}"
# number: 1
# radiusServers:
# - host: 1.2.3.4
# port: 1000
# secret: secret
# visible: true
# wpaEncryptionMode: WPA2 only
# ################################################################
# - name: Update appliance traffic sharping
# cisco.meraki.networks_appliance_traffic_shaping:
# state: present
# globalBandwidthLimits:
# limitDown: 5120
# limitUp: 2048
# networkId: "{{network_id}}"
# - name: Enable Vlans on the MX
# cisco.meraki.networks_appliance_vlans_settings:
# state: present
# networkId: "{{network_id}}"
# vlansEnabled: true
# - name: Update appliance ports
# cisco.meraki.networks_appliance_ports:
# accessPolicy: "open"
# allowedVlans: "all"
# enabled: true
# networkId: "{{network_id}}"
# portId: "2"
# type: "trunk"
# vlan: 10
# state: present
# - name: Get all networks
# cisco.meraki.networks_info:
# organizationId: "{{org_id}}"
# total_pages: -1
# direction: next
# register: result
# - name: Show result
# ansible.builtin.debug:
# msg: "{{ result.meraki_response[0].id }}"
# - name: Bind a template from a network
# meraki_config_template:
# auth_key: "{{ meraki_api_key }}"
# state: present
# org_id: "{{ org_name }}"
# net_id: "{{ off_network.results.0.meraki_response.id }}"
# config_template: "{{ item.value.template_name }}"
# delegate_to: localhost
# loop: "{{ lookup('dict', devices) }}"
# - name: Create
# cisco.meraki.organizations_config_templates:
# # meraki_api_key: "{{meraki_api_key}}"
# state: present
# name: My config template
# organizationId: "{{ org_id }}"
# register: result
# - name: Create
# cisco.meraki.networks_bind:
# autoBind: false
# configTemplateId: "{{result.meraki_response.id}}"
# networkId: "{{network_id}}"
# - name: change name of device
# cisco.meraki.devices:
# name: new name 4
# serial: QBSB-D5ZD-9CXT
# # organizationId: "{{org_id}}"
# state: present
# meraki_suppress_logging: false
- name: onboard order
cisco.meraki.organizations_inventory_claim:
# meraki_api_key: "{{ meraki_api }}"
# meraki_simulate: "{{ testpolicy }}"
organizationId: "{{ org_id }}"
orders: "1"
|