ansible-role-prometheus-ruc.../tasks/main.yml
2025-07-31 03:29:10 +02:00

36 lines
1,022 B
YAML

- name: Install dependencies
ansible.builtin.apt:
pkg:
- python3-aiohttp
- python3-xmltodict
- python3-cryptography
- name: Clone aioruckus library
ansible.builtin.git:
dest: /usr/local/lib/python-aioruckus
repo: https://github.com/ms264556/aioruckus.git
accept_hostkey: true
update: true
version: a639df7585f29aaddc24ebffb9fa0c497d0a55d3
- name: Update config
ansible.builtin.template:
src: prometheus-ruckus-exporter.j2
dest: /etc/default/prometheus-ruckus-exporter
mode: "0640"
notify:
- Restart prometheus-ruckus-exporter
- name: Copy ruckus-exporter script
ansible.builtin.copy:
src: prometheus-ruckus-exporter
dest: /usr/local/sbin/prometheus-ruckus-exporter
mode: "0755"
notify: Restart prometheus-ruckus-exporter
- name: Create ruckus-exporter systemd unit
ansible.builtin.copy:
src: prometheus-ruckus-exporter.service
dest: /etc/systemd/system/prometheus-ruckus-exporter.service
notify: Restart prometheus-ruckus-exporter