Skip to content
Snippets Groups Projects
Verified Commit 90d0267f authored by Thomas Schneider's avatar Thomas Schneider
Browse files

WIP

parent 622965ac
Branches th/apache
No related tags found
No related merge requests found
---
rt_enable_acmetool: False
rt_workers: 4
rt_webserver: "nginx"
# TODO apache2? conditional?
- name: restart RT
service: name=rt4-fcgi state=restarted
......
......@@ -62,6 +62,24 @@
- import_tasks: postgres.yml
- name: Have RT packages for nginx installed
apt:
name: rt4-fcgi
state: present
install_recommends: no
when: rt_webserver == "nginx"
tags:
- rt
- name: Have RT packages for apache2 installed
apt:
name: rt4-apache2
state: present
install_recommends: no
when: rt_webserver == "apache2"
tags:
- rt
- name: Have RT packages installed
apt:
name: "{{ item }}"
......@@ -69,11 +87,13 @@
install_recommends: no
with_items:
- request-tracker4
- rt4-fcgi
- rt4-db-postgresql
tags:
- rt
- name: Configure nginx
when: rt_webserver == "nginx"
block:
- name: Have nginx config for RT installed
template:
src: nginx-rt.j2
......@@ -112,6 +132,33 @@
tags:
- rt
- name: Configure apache2
when: rt_webserver == "apache2"
block:
- name: Install config
template:
src: apache2.j2
dest: /etc/apache2/sites-available/rt.conf
owner: root
group: root
mode: 0644
tags:
- rt
- config
notify:
- reload apache2
- name: Have apache2 config for RT activated
file:
state: link
src: /etc/apache2/sites-available/rt
dest: /etc/apache2/sites-enabled/rt
tags:
- rt
- config
notify:
- reload apache2
- name: Have DB for RT initialized
shell: "rt-setup-database --action init --skip-create && touch /etc/request-tracker4/.db_initialized"
args:
......@@ -130,11 +177,12 @@
tags:
- rt
- name: Have RT up und running
- name: Have RT up und running (nginx)
service:
name: "{{ item }}"
state: started
enabled: yes
when: rt_webserver == "nginx"
with_items:
- rt4-fcgi
- request-tracker4
......@@ -144,3 +192,15 @@
- restart nginx
tags:
- rt
- name: Have RT up und running (apache2)
service:
name: "{{ item }}"
state: started
enabled: yes
when: rt_webserver == "apache2"
with_items:
- apache2
- request-tracker4
tags:
- rt
# TODO /etc/request-tracker4/apache2-fastcgi.conf
FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300
<VirtualHost {{rt_webdomain}}>
AddDefaultCharset UTF-8
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
DocumentRoot "/opt/rt4/share/html"
<Location />
<IfVersion >= 2.4> # For Apache 2.4
Require all granted
</IfVersion>
<IfVersion < 2.4> # For Apache 2.2
Order allow,deny
Allow from all
</IfVersion>
Options +ExecCGI
AddHandler fastcgi-script fcgi
</Location>
</VirtualHost>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment