ansible/roles/services/tasks/wifi_mqtt.yaml

32 lines
672 B
YAML

---
- name: Install dependencies
ansible.builtin.apt:
name:
- php-cli
- php-snmp
- make
- name: Clone source
ansible.builtin.git:
repo: https://github.com/bitlair/wifi-mqtt.git
version: main
dest: /var/lib/wifi-mqtt
accept_hostkey: yes
notify: Restart wifi-mqtt
ignore_errors: true
- name: Install service file
ansible.builtin.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
ansible.builtin.systemd:
name: wifi-mqtt
state: started
enabled: true
daemon_reload: true