summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-06 14:02:09 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-06 14:02:09 -0200
commit2929379eb88fe6941f28033d84e545f3c3a95e53 (patch)
treecba377dd4f8e1a1740b64310b6d17cb99a3302a0
parentcd958ea3b89c93f56e4901e6fc2543d4af0e1e5b (diff)
downloadpuppet-mysql-2929379eb88fe6941f28033d84e545f3c3a95e53.tar.gz
puppet-mysql-2929379eb88fe6941f28033d84e545f3c3a95e53.tar.bz2
Setting also root passwords for fqdn and 127.0.0.1 hosts
-rw-r--r--templates/setmysqlpass.sh.erb2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/setmysqlpass.sh.erb b/templates/setmysqlpass.sh.erb
index 1cc34db..b3b14b3 100644
--- a/templates/setmysqlpass.sh.erb
+++ b/templates/setmysqlpass.sh.erb
@@ -10,5 +10,7 @@ DEFAULTS="/etc/mysql/debian.cnf"
# Run
/usr/bin/mysql --defaults-file=$DEFAULTS <<EOF
UPDATE mysql.user SET Password=PASSWORD('$PASSWORD') WHERE User='root' AND Host='localhost';
+UPDATE mysql.user SET Password=PASSWORD('$PASSWORD') WHERE User='root' AND Host='<%= fqdn %>';
+UPDATE mysql.user SET Password=PASSWORD('$PASSWORD') WHERE User='root' AND Host='127.0.0.1';
FLUSH PRIVILEGES;
EOF