Automated changes from linter ;P
This commit is contained in:
parent
44b73a216f
commit
f7f04e7a41
65 changed files with 392 additions and 324 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue