Initial file structure refactor

This commit is contained in:
Sonny Bakker 2021-01-27 22:40:26 +01:00
parent fe72523a5a
commit ccab22dea3
31 changed files with 369 additions and 427 deletions

32
tasks/poetry.yml Normal file
View file

@ -0,0 +1,32 @@
- name: include poetry tasks
include_role:
name: common
tasks_from: 'poetry.yml'
vars:
poetry_user: '{{ app_user }}'
poetry_dir: '/home/{{ app_user }}/.poetry'
- name: retrieve user $PATH
shell: 'echo $PATH'
become_user: '{{ app_user }}'
register: path_stats
- name: set poetry user variables
set_fact:
poetry_user_path: '{{ path_stats.stdout }}'
- name: set default venv python version
become_user: '{{ app_user }}'
command: 'poetry env use python3.7'
args:
chdir: '{{ app_dir }}'
environment:
PATH: '/home/{{ app_user }}/.local/bin:{{ poetry_user_path }}'
- name: install project dependencies
become_user: '{{ app_user }}'
command: 'poetry install --extras "sentry"'
args:
chdir: '{{ app_dir }}'
environment:
PATH: '/home/{{ app_user }}/.local/bin:{{ poetry_user_path }}'