commit 1568b5138cf385514efb8e1bda7916ce139d4bde
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Sep 1 12:48:00 2016 +0200
Update bugzilla with db_driver
host_vars/bugzilla02.online.rpmfusion.net | 4 ++--
roles/bugzilla/tasks/main.yml | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git
a/host_vars/bugzilla02.online.rpmfusion.net
b/host_vars/bugzilla02.online.rpmfusion.net
index d470e57..ed383b4 100644
---
a/host_vars/bugzilla02.online.rpmfusion.net
+++
b/host_vars/bugzilla02.online.rpmfusion.net
@@ -10,5 +10,5 @@ datacenter: online
nrpe_procs_warn: 900
nrpe_procs_crit: 1000
-bugzilla_db_host: db02
-bugzilla_db_driver: Pg
+bugzilla_db_host: ''
+bugzilla_db_driver: MySQL
diff --git a/roles/bugzilla/tasks/main.yml b/roles/bugzilla/tasks/main.yml
index 197b839..5607cdc 100644
--- a/roles/bugzilla/tasks/main.yml
+++ b/roles/bugzilla/tasks/main.yml
@@ -13,13 +13,26 @@
with_items:
- bugzilla
- bugzilla-contrib
- - perl-DBD-Pg
- perl-Test-Taint
- perl-XMLRPC-Lite
tags:
- packages
- bugzilla
+- name: install perl-DBD-MySQL if needed by bugzilla
+ yum: pkg=perl-DBD-MySQL state=present
+ when: bugzilla_db_driver == 'MySQL'
+ tags:
+ - packages
+ - bugzilla
+
+- name: install perl-DBD-Pg if needed by bugzilla
+ yum: pkg=perl-DBD-Pg state=present
+ when: bugzilla_db_driver == 'Pg'
+ tags:
+ - packages
+ - bugzilla
+
- name: bugzilla localconfig in place
template: src=localconfig dest=/etc/bugzilla/localconfig mode=0640 owner=root
group=apache
tags: