mirror of
https://github.com/roles-ansible/ansible_collection_pretix.git
synced 2024-10-28 22:01:03 +01:00
Install requirements for pretix
This commit is contained in:
parent
1135632c3f
commit
cc88670a46
5 changed files with 63 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
pretix__user: 'pretix'
|
||||
pretix__group: "{{ pretix__user }}"
|
||||
|
||||
# Optional perform simple Versionscheck
|
||||
packages__submodules_versioncheck: false
|
||||
|
|
13
roles/pretix/tasks/main.yml
Normal file
13
roles/pretix/tasks/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: Run simple versionscheck (optional)
|
||||
ansible.builtin.include_tasks:
|
||||
file: 'versioncheck.yml'
|
||||
when: packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Create user for pretix
|
||||
ansible.builtin.include_tasks:
|
||||
file: 'user.yml'
|
||||
|
||||
- name: Install required packages
|
||||
ansible.builtin.include_tasks:
|
||||
file: 'packages.yml'
|
15
roles/pretix/tasks/packages.yml
Normal file
15
roles/pretix/tasks/packages.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: Update apt repo-cache on debian/ubuntu hosts
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
when:
|
||||
- ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: Install Required packages
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: 'present'
|
||||
loop: "{{ pretix__packages | flatten(1) }}"
|
16
roles/pretix/tasks/user.yml
Normal file
16
roles/pretix/tasks/user.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: Create group for pretix
|
||||
become: true
|
||||
ansible.builtin.group:
|
||||
name: "{{ pretix__group }}"
|
||||
state: present
|
||||
|
||||
- name: Add user for pretix with disabled password
|
||||
become: true
|
||||
ansible.builtin.user:
|
||||
name: "{{ pretix__user }}"
|
||||
home: "{{ pretix__home }}"
|
||||
group: "{{ pretix__group }}"
|
||||
password: '!'
|
||||
create_home: true
|
||||
system: true
|
|
@ -1,3 +1,19 @@
|
|||
---
|
||||
pretix__packages:
|
||||
- git
|
||||
- build-essential
|
||||
- python3-dev
|
||||
- python3-venv
|
||||
- python3
|
||||
- python3-pip
|
||||
- libxml2-dev
|
||||
- libxslt1-dev
|
||||
- libffi-dev
|
||||
- zlib1g-dev
|
||||
- libssl-dev
|
||||
- gettext
|
||||
- libpq-dev
|
||||
- libjpeg-dev
|
||||
- libopenjp2-7-dev
|
||||
packages__playbook_version_number: 3
|
||||
packages__playbook_version_path: 'l3d.pretix.pretix.version'
|
||||
|
|
Loading…
Reference in a new issue