eae-am-deutschen-platz/playbook_provision_accesspo...

50 lines
1.1 KiB
YAML

---
- name: provision aps
hosts: accesspoints
gather_facts: no
tasks:
- name: provision /etc/config
template:
src: "{{ item }}"
dest: /etc/config/
with_fileglob:
- "templates/accesspoints/etc/config/*"
notify:
- "reload {{ item | basename }}"
- name: distribute custom wifi.lua
copy:
src: files/wifi.lua
dest: /usr/lib/lua/prometheus-collectors/wifi.lua
owner: root
group: root
mode: 0744
notify:
- restart prometheus-node-exporter-lua
handlers:
- name: reload network
service:
name: network
state: reloaded
when: skip_wifi is not defined
- name: reload wireless
command: wifi reconf
when: skip_wifi is not defined
- name: reload system
service:
name: system
state: reloaded
- name: reload lldpd
service:
name: lldpd
state: reloaded
- name: restart prometheus-node-exporter-lua
service:
name: prometheus-node-exporter-lua
state: restarted