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:
52
roles/taiga/tasks/taiga-events.yml
Normal file
52
roles/taiga/tasks/taiga-events.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
- name: ensure nodejs is installed
|
||||
package:
|
||||
name:
|
||||
- nodejs
|
||||
- npm
|
||||
state: present
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: ensure taiga-events directory exists
|
||||
file:
|
||||
path: /usr/local/lib/taiga/taiga-events
|
||||
owner: taiga
|
||||
group: taiga
|
||||
mode: '0755'
|
||||
state: directory
|
||||
- name: ensure taiga-events is installed
|
||||
become: true
|
||||
become_user: taiga
|
||||
unarchive:
|
||||
src: '{{ taiga_events_url }}'
|
||||
dest: /usr/local/lib/taiga/
|
||||
remote_src: true
|
||||
|
||||
- name: ensure taiga-events dependencies are installed
|
||||
become: true
|
||||
become_user: taiga
|
||||
npm:
|
||||
path: /usr/local/lib/taiga/taiga-events
|
||||
|
||||
- name: ensure taiga-events is configured
|
||||
template:
|
||||
src: taiga-events.config.json.j2
|
||||
dest: /usr/local/lib/taiga/taiga-events/config.json
|
||||
owner: root
|
||||
group: taiga
|
||||
mode: '0750'
|
||||
notify:
|
||||
- restart taiga-events
|
||||
|
||||
- name: ensure taiga-events systemd unit is installed
|
||||
copy:
|
||||
src: taiga-events.service
|
||||
dest: /etc/systemd/system/taiga-events.service
|
||||
mode: '0644'
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart taiga-events
|
||||
- name: ensure taiga-events starts at boot
|
||||
service:
|
||||
name: taiga-events
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user