Automated changes from linter ;P

This commit is contained in:
Mark Janssen 2024-07-11 20:47:52 +02:00
parent 44b73a216f
commit f7f04e7a41
Signed by: foobar
GPG key ID: D8674D8FC4F69BD2
65 changed files with 392 additions and 324 deletions

View file

@ -1,23 +1,25 @@
---
- name: Install dependencies
apt:
ansible.builtin.apt:
name:
- python3-paho-mqtt
- python3-tz
- virtualenv
- name: Create virtualenv
command: virtualenv /opt/miflora_exporter/.venv
ansible.builtin.command:
cmd: virtualenv /opt/miflora_exporter/.venv
args:
creates: /var/lib/discord-bot/.venv
- name: Install Python dependencies
shell: . .venv/bin/activate && pip install -r requirements.txt
ansible.builtin.shell:
cmd: . .venv/bin/activate && pip install -r requirements.txt
args:
chdir: /var/lib/discord-bot
- name: Clone source
git:
ansible.builtin.git:
repo: https://github.com/bitlair/discord-bot.git
version: main
dest: /var/lib/discord-bot
@ -25,7 +27,7 @@
notify: restart discord-bot
- name: Install service file
template:
ansible.builtin.template:
src: discord-bot.service
dest: /etc/systemd/system/discord-bot.service
owner: root
@ -34,7 +36,7 @@
notify: restart discord-bot
- name: Start discord-bot
systemd:
ansible.builtin.systemd:
name: discord-bot
state: started
enabled: yes