Apply fixes

This commit is contained in:
Sonny Bakker 2021-06-05 15:13:46 +02:00
parent 78874bd617
commit 2f50f503e4
4 changed files with 17 additions and 13 deletions

View file

@ -38,10 +38,7 @@
PATH: '/home/{{ app_user }}/.local/bin:{{ poetry_user_path }}'
- name: install project dependencies
command:
argv:
- 'poetry install'
- '--no-dev'
command: 'poetry install --no-dev'
args:
chdir: '{{ app_dir }}'
environment:
@ -53,8 +50,16 @@
dest: '{{ app_dir }}/.env'
mode: 0600
- name: create systemd user directory
file:
path: '{{ systemd_dir }}'
state: 'directory'
- name: copy systemd templates
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
mode: '{{ item.mode }}'
loop:
- {
src: 'templates/timer.j2',

View file

@ -7,8 +7,5 @@ Description=Transip-client service
[Service]
EnvironmentFile={{ app_dir }}/.env
WorkingDirectory={{ app_dir }}
ExecStart=poetry run listen
ExecStart={{ ansible_env.HOME }}/.local/bin/poetry run listen
Type=oneshot
[Install]
WantedBy=default.target

View file

@ -5,7 +5,8 @@
Description=Trans IP client timer
[Timer]
OnCalendar=+5min
OnBootSec=15min
OnUnitActiveSec=5min
Unit=transip-client.service
Persistent=true

View file

@ -1,4 +1,5 @@
app_url: 'https://git.fudiggity.nl/sonny/transip_client.git'
app_user: 'sonny'
app_branch: '0.3.1'
app_dir: '{{ ansible_env.HOME }}/apps/transip_client'
app_domains:
@ -44,7 +45,7 @@ app_token: !vault |
61353763326432313934363132353738323437366537383763313361636165353165353566396261
6237
systemd_dir: '{{ ansible_user_id }}/.config/systemd/user'
systemd_dir: '{{ ansible_env.HOME }}/.config/systemd/user'
sentry_dsn: !vault |
$ANSIBLE_VAULT;1.1;AES256
@ -60,4 +61,4 @@ packages:
- python3
- python3-dev
- python3-venv
- dns-utils
- getdns-utils