From a283fd378f1507a75b88cc5c3e8f7a98834edd6a Mon Sep 17 00:00:00 2001 From: nazunalika Date: Wed, 20 Jan 2021 17:55:13 -0700 Subject: [PATCH] mantis --- ansible/playbooks/tasks/mantis.yml | 40 ++++++++++++++----- .../templates/etc/httpd/conf.d/mantis.conf.j2 | 33 +++++++++++++++ .../var/www/mantis/config/config_inc.php.j2 | 40 +++++++++++++++++++ ansible/playbooks/vars/mantis.yml | 18 +++++++++ 4 files changed, 121 insertions(+), 10 deletions(-) create mode 100644 ansible/playbooks/templates/etc/httpd/conf.d/mantis.conf.j2 create mode 100644 ansible/playbooks/templates/var/www/mantis/config/config_inc.php.j2 create mode 100644 ansible/playbooks/vars/mantis.yml 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 @@ +