Add the photos role
This commit is contained in:
parent
24c4d845ae
commit
786bb5cbdc
10 changed files with 169 additions and 0 deletions
34
roles/photos/tasks/photos2mqtt.yaml
Normal file
34
roles/photos/tasks/photos2mqtt.yaml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue