--- - name: Install dependencies ansible.builtin.apt: name: - make - liblinux-inotify2-perl - name: Install mqtt-simple community.general.cpanm: name: Net::MQTT::Simple - name: Install photos2mqtt ansible.builtin.template: src: photos2mqtt.pl dest: /opt/photos2mqtt.pl owner: root group: root mode: 0755 notify: restart photos2mqtt - name: Install photos2mqtt service file ansible.builtin.template: src: photos2mqtt.service dest: /etc/systemd/system/photos2mqtt.service owner: root group: root mode: 0644 notify: restart photos2mqtt - name: Start photos2mqtt ansible.builtin.systemd: name: photos2mqtt state: started enabled: true daemon_reload: true