--- - name: Install dependencies ansible.builtin.apt: name: - php-cli - php-snmp - make - name: Install mqtt-simple community.general.cpanm: name: Net::MQTT::Simple - name: Add user ansible.builtin.user: name: spacestated home: /var/lib/spacestated generate_ssh_key: yes ssh_key_type: ed25519 - name: Clone source ansible.builtin.git: repo: https://github.com/bitlair/spacestated.git version: main dest: /var/lib/spacestated/spacestated accept_hostkey: yes notify: Restart spacestated ignore_errors: true - name: Install service file ansible.builtin.template: src: spacestated.service dest: /etc/systemd/system/spacestated.service owner: root group: root mode: 0644 notify: Restart spacestated - name: Start spacestated ansible.builtin.systemd: name: spacestated state: started enabled: true daemon_reload: true