ansible/roles/services/tasks/spacestated.yaml
2022-10-23 13:17:38 +02:00

30 lines
631 B
YAML

---
- name: Install mqtt-simple
command: cpan Net::MQTT::Simple
- name: Install dependencies
apt:
name: [ php-cli, php-snmp ]
- name: Add user
user:
name: spacestated
home: /var/lib/spacestated
generate_ssh_key: yes
ssh_key_type: ed25519
- name: Clone source
git:
repo: https://github.com/bitlair/spacestated.git
version: main
dest: /var/lib/spacestated/spacestated
accept_hostkey: yes
- name: Install service file
template:
src: spacestated.service
dest: /etc/systemd/system/spacestated.service
owner: root
group: root
mode: 0644
notify: restart spacestated