Move to simpler file structure
This commit is contained in:
parent
fe72523a5a
commit
d71a28e1c8
33 changed files with 374 additions and 406 deletions
32
tasks/poetry.yml
Normal file
32
tasks/poetry.yml
Normal 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 }}'
|
||||
Reference in a new issue