roles/taiga: Deploy Taiga project management app
The *taiga* role installs the three components of Taiga: * taiga-back * taiga-events * taiga-front *taiga-back* is a Python application. Its dependencies are installed via `pip` in the *taiga* user's site-packages, and the application itself is installed by unpacking the archive. *taiga-events* is a Node.js application. Its dependencies are installed by `npm`, and is itself installed by unpacking the archive. Finally, *taiga-front* is a single-page browser application that is installed by unpacking the archive, and served by Apache. Taiga requires PostgreSQL and RabbitMQ.
This commit is contained in:
73
roles/taiga/tasks/taiga-back.yml
Normal file
73
roles/taiga/tasks/taiga-back.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
- name: ensure system dependencies are installed
|
||||
package:
|
||||
name:
|
||||
- gzip
|
||||
- libjpeg
|
||||
- python3-psycopg2
|
||||
- '{{ taiga_python_package }}'
|
||||
- sudo
|
||||
- tar
|
||||
- zlib
|
||||
state: present
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: ensure taiga user exists
|
||||
user:
|
||||
name: taiga
|
||||
system: yes
|
||||
home: /var/lib/taiga
|
||||
state: present
|
||||
|
||||
- name: ensure taiga dependencies are installed
|
||||
environment:
|
||||
PIP_NO_INDEX: t
|
||||
PIP_FIND_LINKS: '{{ taiga_pip_url }}'
|
||||
PIP_TRUSTED_HOST: '{{ taiga_pip_url|urlsplit("hostname") }}'
|
||||
pip:
|
||||
requirements: '{{ taiga_pip_url }}/requirements.txt'
|
||||
virtualenv: /usr/local/lib/taiga/venv
|
||||
virtualenv_command: '{{ taiga_python_exe }} -m venv'
|
||||
state: present
|
||||
- name: ensure taiga-back is installed
|
||||
unarchive:
|
||||
src: '{{ taiga_back_url }}'
|
||||
dest: /usr/local/lib/taiga/
|
||||
remote_src: true
|
||||
notify:
|
||||
- migrate taiga data
|
||||
- compile taiga messages
|
||||
- collect taiga static data
|
||||
|
||||
- name: ensure taiga media directory exists
|
||||
file:
|
||||
path: /usr/local/lib/taiga/taiga-back/media
|
||||
owner: taiga
|
||||
group: taiga
|
||||
mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: ensure taiga-back is configured
|
||||
template:
|
||||
src: settings.py.j2
|
||||
dest: /usr/local/lib/taiga/taiga-back/settings/local.py
|
||||
|
||||
- name: ensure taiga-back entry point script is installed
|
||||
copy:
|
||||
src: taiga-back.sh
|
||||
dest: /usr/local/libexec/taiga-back.sh
|
||||
mode: '0755'
|
||||
notify:
|
||||
- restart taiga
|
||||
- name: ensure taiga systemd unit is installed
|
||||
copy:
|
||||
src: taiga.service
|
||||
dest: /etc/systemd/system/taiga.service
|
||||
mode: '0644'
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart taiga
|
||||
- name: ensure taiga starts at boot
|
||||
service:
|
||||
name: taiga
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user