Compare commits
No commits in common. "ef6d87e3b107fdd40e834772a4f238db107648fc" and "55905adfa4990cc6a20850359d01913f96b228d3" have entirely different histories.
ef6d87e3b1
...
55905adfa4
4 changed files with 5 additions and 35 deletions
|
@ -1,3 +1,3 @@
|
||||||
bank_user: bank
|
bank_user: bank
|
||||||
bank_revbank_git: https://git.bitlair.nl/bitlair/revbank.git
|
bank_revbank_git: https://github.com/revspace/revbank.git
|
||||||
bank_local_tty: no
|
bank_local_tty: no
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Update product prices in Revbank
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/opt/revbank-inflatinator/.venv/bin/python /opt/revbank-inflatinator/inflatinator/ /home/bank/revbank.products
|
|
||||||
EnvironmentFile=/etc/revbank-inflatinator/env.conf
|
|
||||||
User=bank
|
|
||||||
Group=bank
|
|
|
@ -1,33 +1,12 @@
|
||||||
---
|
---
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: virtualenv
|
name: [ links, python3-pyquery ]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Clone revbank-inflatinator source
|
- name: Clone revbank-inflatinator source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://git.bitlair.nl/bitlair/revbank-inflatinator.git
|
repo: https://github.com/bitlair/revbank-inflatinator.git
|
||||||
version: main
|
version: main
|
||||||
dest: /opt/revbank-inflatinator
|
dest: /opt/revbank-inflatinator
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
||||||
- name: Create virtualenv
|
|
||||||
ansible.builtin.command:
|
|
||||||
cmd: virtualenv /opt/revbank-inflatinator/.venv
|
|
||||||
args:
|
|
||||||
creates: /opt/revbank-inflatinator/.venv
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: . .venv/bin/activate && pip install -r requirements.txt
|
|
||||||
args:
|
|
||||||
chdir: /opt/revbank-inflatinator
|
|
||||||
|
|
||||||
- name: Install service
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: inflatinator.service
|
|
||||||
dest: /etc/systemd/system/revbank-inflatinator.service
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
notify: Daemon reload
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify:
|
||||||
- Daemon reload
|
- daemon reload
|
||||||
- restart mqtt_exporter
|
- restart mqtt_exporter
|
||||||
|
|
||||||
- name: Install config file
|
- name: Install config file
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify:
|
||||||
- Daemon reload
|
- daemon reload
|
||||||
- restart mqtt_exporter
|
- restart mqtt_exporter
|
||||||
|
|
||||||
- ansible.builtin.meta: flush_handlers
|
- ansible.builtin.meta: flush_handlers
|
||||||
|
|
Loading…
Add table
Reference in a new issue