diff --git a/ansible/playbooks/tasks/mantis.yml b/ansible/playbooks/tasks/mantis.yml
index b0133c9..52abeee 100644
--- a/ansible/playbooks/tasks/mantis.yml
+++ b/ansible/playbooks/tasks/mantis.yml
@@ -14,15 +14,35 @@
yum:
name: "{{ mantis_pkg }}"
state: present
- vars:
- mantis_pkg:
- - php
- - php-ldap
- - httpd
- - mod_ssl
- - php-pgsql
- - php-mbstring
- - php-curl
- - openldap
tags:
- packages
+
+- name: Download the bugtracker
+ get_url:
+ url: "http://downloads.sourceforge.net/mantisbt/mantisbt-{{ mantis_version }}.tar.gz"
+ dest: "/tmp/mantisbt-{{ mantis_version }}.tar.gz"
+ checksum: "{{ mantis_checksum }}"
+
+- name: Extract mantis
+ unarchive:
+ src: "/tmp/mantisbt-{{ mantis_version }}.tar.gz"
+ dest: "/var/www"
+ owner: apache
+ group: apache
+ remote_src: true
+
+- name: Configure mantis
+ template:
+ src: "var/www/mantis/config/config_inc.php.j2"
+ dest: "/var/www/mantisbt-{{ mantis_version }}/config/config_inc.php"
+ owner: apache
+ group: apache
+ mode: '0640'
+
+- name: Configure httpd
+ template:
+ src: "etc/httpd/conf.d/mantis.conf.j2"
+ dest: "/etc/httpd/conf.d/mantis.conf"
+ owner: root
+ group: root
+ mode: '0644'
diff --git a/ansible/playbooks/templates/etc/httpd/conf.d/mantis.conf.j2 b/ansible/playbooks/templates/etc/httpd/conf.d/mantis.conf.j2
new file mode 100644
index 0000000..5d08ddd
--- /dev/null
+++ b/ansible/playbooks/templates/etc/httpd/conf.d/mantis.conf.j2
@@ -0,0 +1,33 @@
+
+ ServerAdmin infrastructure@rockylinux.org
+ DocumentRoot "/var/www/mantisbt-{{ mantis_version }}"
+ ServerName bugs.rockylinux.org
+ TransferLog /var/log/httpd/mantis_access.log
+ ErrorLog /var/log/httpd/mantis_error.log
+
+ Options MultiViews FollowSymlinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+
+
+
+
+ SSLEngine on
+ SSLHonorCipherOrder on
+ SSLCipherSuite PROFILE=SYSTEM
+ SSLProxyCipherSuite PROFILE=SYSTEM
+ SSLCertificateFile /etc/pki/tls/certs/bugs.rockylinux.org.crt
+ SSLCertificateKeyFile /etc/pki/tls/private/bugs.rockylinux.org.key
+ ServerAdmin infrastructure@rockylinux.org
+ DocumentRoot "/var/www/mantisbt-{{ mantis_version }}"
+ ServerName bugs.rockylinux.org
+ TransferLog /var/log/httpd/mantis_access.log
+ ErrorLog /var/log/httpd/mantis_error.log
+
+ Options MultiViews FollowSymlinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+
+
diff --git a/ansible/playbooks/templates/var/www/mantis/config/config_inc.php.j2 b/ansible/playbooks/templates/var/www/mantis/config/config_inc.php.j2
new file mode 100644
index 0000000..ec78437
--- /dev/null
+++ b/ansible/playbooks/templates/var/www/mantis/config/config_inc.php.j2
@@ -0,0 +1,40 @@
+