46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
---
|
|
- name: provision aps
|
|
hosts: accesspoints
|
|
gather_facts: no
|
|
vars:
|
|
- wifi_ssid: "GU Deutscher Platz"
|
|
- wifi_encryption: "none"
|
|
tasks:
|
|
- name: provision /etc/config
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: /etc/config/
|
|
with_fileglob:
|
|
- "templates/accesspoints/etc/config/*"
|
|
notify:
|
|
- "reload {{ item | basename }}"
|
|
|
|
- name: install custom prometheus-node-exporter-lua-wifi
|
|
copy:
|
|
src: files/wifi.lua
|
|
dest: /usr/lib/lua/prometheus-collectors/wifi.lua
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
notify:
|
|
- restart prometheus-node-exporter-lua
|
|
|
|
handlers:
|
|
- name: reload network
|
|
service:
|
|
name: network
|
|
state: reloaded
|
|
|
|
- name: reload wireless
|
|
command: wifi reconf
|
|
|
|
- name: reload system
|
|
service:
|
|
name: system
|
|
state: reloaded
|
|
|
|
- name: restart prometheus-node-exporter-lua
|
|
service:
|
|
name: prometheus-node-exporter-lua
|
|
state: restarted
|