-
Notifications
You must be signed in to change notification settings - Fork 1
/
update_wireless.yml
35 lines (31 loc) · 1.09 KB
/
update_wireless.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
---
- hosts: localhost
gather_facts: no
vars:
file_url: https://raw.githubusercontent.com/dafmendo/gitops_ansible-sdwan/main/wireless.yml
tasks:
- name: Get current file
set_fact:
wireless: "{{ src | from_yaml }}"
vars:
src: "{{ lookup('url', file_url, split_lines='no') }}"
- name: update SSIDs
cisco.meraki.meraki_mr_ssid:
auth_key: "{{ meraki_key }}"
org_name: "{{ wireless.Org_Name }}"
net_name: "{{ wireless.Net_Name }}"
state: "{{ item.state | default('present') }}"
enabled: "{{ item.enabled | default(True) | bool}}"
name: "{{ item.name }}"
number: "{{ item.number }}"
encryption_mode: "{{ item.encryption_mode }}"
auth_mode: "{{ item.auth_mode }}"
psk: "{{ item.psk }}"
delegate_to: localhost
loop: "{{ wireless.SSID }}"
register: applied_changes
- name: Save info for next steps
set_stats:
data:
change_req_id: "{{ change_req_id | default('TEST') }}"
applied_changes: "{{ applied_changes | default('TEST') }}"