Add the photos role

This commit is contained in:
polyfloyd 2023-09-10 17:48:21 +02:00
parent 24c4d845ae
commit 786bb5cbdc
10 changed files with 169 additions and 0 deletions

View file

@ -0,0 +1,34 @@
---
- name: Install dependencies
apt:
name:
- make
- liblinux-inotify2-perl
- name: Install mqtt-simple
command: cpan Net::MQTT::Simple
- name: Install photos2mqtt
template:
src: photos2mqtt.pl
dest: /opt/photos2mqtt.pl
owner: root
group: root
mode: 0755
notify: restart photos2mqtt
- name: Install photos2mqtt service file
template:
src: photos2mqtt.service
dest: /etc/systemd/system/photos2mqtt.service
owner: root
group: root
mode: 0644
notify: restart photos2mqtt
- name: Start photos2mqtt
systemd:
name: photos2mqtt
state: started
enabled: yes
daemon_reload: true