ansible/roles/services/tasks/wifi_mqtt.yaml

31 lines
599 B
YAML

---
- name: Install dependencies
ansible.builtin.apt:
name:
- php-cli
- php-snmp
- make
- name: Clone source
git:
repo: https://github.com/bitlair/wifi-mqtt.git
version: main
dest: /var/lib/wifi-mqtt
accept_hostkey: yes
notify: restart wifi-mqtt
- name: Install service file
template:
src: wifi-mqtt.service
dest: /etc/systemd/system/wifi-mqtt.service
owner: root
group: root
mode: 0644
notify: restart wifi-mqtt
- name: Start wifi-mqtt
systemd:
name: wifi-mqtt
state: started
enabled: yes
daemon_reload: true