Dzahn has submitted this change and it was merged.

Change subject: Phabricator: Allow setting the mysql.user and mysql.pass in labs
......................................................................


Phabricator: Allow setting the mysql.user and mysql.pass in labs

This will allow us to choose the user and pass for mysql for app, mail
and daemons.

Bug: T139475
Change-Id: I982f571fbf83bd67b4c513fad361f397a4c3c3d1
---
M modules/role/manifests/phabricator/main.pp
1 file changed, 26 insertions(+), 4 deletions(-)

Approvals:
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index e461112..a98a4dc 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -38,13 +38,35 @@
         $dump_enabled = false
     }
 
+    $phab_app_user = hiera('phabricator_app_user', undef)
+    $phab_app_pass = hiera('phabricator_app_pass', undef)
+    $phab_daemons_user = hiera('phabricator_daemons_user', undef)
+    $phab_daemons_pass = hiera('phabricator_daemons_pass', undef)
+
     # todo: change the password for app_user
-    $app_user = $passwords::mysql::phabricator::app_user
-    $app_pass = $passwords::mysql::phabricator::app_pass
+    if $phab_app_user == undef {
+        $app_user = $passwords::mysql::phabricator::app_user
+    } else {
+        $app_user = $phab_app_user
+    }
+    if $phab_app_pass == undef {
+        $app_pass = $passwords::mysql::phabricator::app_pass
+    } else {
+        $app_pass = $phab_app_pass
+    }
 
     # todo: create a separate phd_user and phd_pass
-    $daemons_user = $passwords::mysql::phabricator::app_user
-    $daemons_pass = $passwords::mysql::phabricator::app_pass
+    if $phab_daemons_user == undef {
+        $daemons_user = $passwords::mysql::phabricator::app_user
+    } else {
+        $daemons_user = $phab_daemons_user
+    }
+    if $phab_daemons_pass == undef {
+        $daemons_pass = $passwords::mysql::phabricator::app_pass
+    } else {
+        $daemons_pass = $phab_daemons_pass
+    }
+
     # todo: create a separate mail_user and mail_pass?
     $mail_user = $daemons_user
     $mail_pass = $daemons_pass

-- 
To view, visit https://gerrit.wikimedia.org/r/323146
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I982f571fbf83bd67b4c513fad361f397a4c3c3d1
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to