aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker/database/mysql.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/pacemaker/database/mysql.pp')
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index bec955c..2715260 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -159,8 +159,12 @@ MYSQL_HOST=localhost\n",
# with proper credentials. This step happens on every node because this sql
# statement does not automatically replicate across nodes.
$mysql_root_password = hiera('mysql::server::root_password')
+ $galera_set_pwd = "/bin/touch /root/.my.cnf && \
+ /bin/echo \"UPDATE mysql.user SET Password = PASSWORD('${mysql_root_password}') WHERE user = 'root'; \
+ flush privileges;\" | \
+ /bin/mysql --defaults-extra-file=/root/.my.cnf -u root"
exec { 'galera-set-root-password':
- command => "/bin/touch /root/.my.cnf && /bin/echo \"UPDATE mysql.user SET Password = PASSWORD('${mysql_root_password}') WHERE user = 'root'; flush privileges;\" | /bin/mysql --defaults-extra-file=/root/.my.cnf -u root",
+ command => $galera_set_pwd,
}
file { '/root/.my.cnf' :
ensure => file,