mirror of
https://github.com/roles-ansible/ansible_role_etebase.git
synced 2024-08-16 10:19:52 +02:00
start including venv
This commit is contained in:
parent
6d753ae6fe
commit
28a2bd3e8f
3 changed files with 31 additions and 0 deletions
|
@ -4,6 +4,10 @@ etebase_group: 'etebase'
|
||||||
etebase_user: 'etebase'
|
etebase_user: 'etebase'
|
||||||
etebase_user_home: '/var/lib/etebase'
|
etebase_user_home: '/var/lib/etebase'
|
||||||
etebase_shell: '/bin/false'
|
etebase_shell: '/bin/false'
|
||||||
|
etebase_venv: '/tmp/venv'
|
||||||
|
|
||||||
|
# package state
|
||||||
|
etebase_package_state: 'present'
|
||||||
|
|
||||||
# should we do a version check? (recomended)
|
# should we do a version check? (recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
|
@ -5,3 +5,6 @@
|
||||||
|
|
||||||
- name: Create Etebase User/Group
|
- name: Create Etebase User/Group
|
||||||
ansible.builtin.include_tasks: create_user.yml
|
ansible.builtin.include_tasks: create_user.yml
|
||||||
|
|
||||||
|
- name: Setup Virtualenv and install Requirements
|
||||||
|
ansible.builtin.include_tasks: python_venv.yml
|
||||||
|
|
24
tasks/python_venv.yml
Normal file
24
tasks/python_venv.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Install Python3 Virtualenv
|
||||||
|
become: true
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: python3-virtualenv
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install etebase python requirements in virtualenv
|
||||||
|
become: true
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: bottle
|
||||||
|
# requirements: /my_app/requirements.txt
|
||||||
|
virtualenv: "{{ etebase_venv }}"
|
||||||
|
state: "{{ etebase_package_state }}"
|
||||||
|
umask: "0027"
|
||||||
|
|
||||||
|
- name: Fix venv File owner/group
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ etebase_venv }}"
|
||||||
|
state: directory
|
||||||
|
mode: 'u=rwX,g=rX,o='
|
||||||
|
group: "{{ etebase_group }}"
|
||||||
|
owner: "{{ etebase_user }}"
|
Loading…
Reference in a new issue