This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
eae-am-deutschen-platz/playbook_provision_accesspo...

59 lines
1.4 KiB
YAML

---
- name: provision aps
hosts: accesspoints
gather_facts: no
vars:
- wifi_ssid: "GU Deutscher Platz"
- wifi_encryption: "none"
tasks:
- name: create clients bridge (vlan)
blockinfile:
path: /etc/config/network
block: |
config interface 'clients'
option type 'bridge'
option ifname 'eth0.2'
notify:
- reload network
- name: configure wireless
template:
src: templates/aruba-ap-105_wireless.j2
dest: /etc/config/wireless
notify:
- reload wifi
# current os ships with that package and leaks mac addresses into prometheus
# therefore we nuke it
- name: remove prometheus-node-exporter-lua-hostapd_stations
opkg:
name: prometheus-node-exporter-lua-hostapd_stations
state: absent
notify:
- restart prometheus-node-exporter-lua
- name: install prometheus-node-exporter-lua-wifi
opkg:
name: prometheus-node-exporter-lua-wifi
update_cache: yes
notify:
- restart prometheus-node-exporter-lua
- name: install iwinfo
opkg:
name: iwinfo
handlers:
- name: reload network
service:
name: network
state: reloaded
- name: reload wifi
command: wifi reconf
- name: restart prometheus-node-exporter-lua
service:
name: prometheus-node-exporter-lua
state: restarted