Mercurial > repos > other > Puppet
changeset 28:2078241de4ed puppet-3.6
Fix quote issue in MySQL 'root' user renaming command
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 09 Mar 2015 06:42:55 +0000 |
parents | 25405d1350ef |
children | 41df236f3fb0 |
files | modules/website/manifests/mysql.pp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/website/manifests/mysql.pp Mon Mar 09 03:30:18 2015 +0000 +++ b/modules/website/manifests/mysql.pp Mon Mar 09 06:42:55 2015 +0000 @@ -31,7 +31,7 @@ $password = strip($mysqlpassword) $configured_marker = '/etc/mysql/.is-configured' exec { 'Rename root MySQL user for security': - command => "mysql -u root -e 'UPDATE mysql.user SET User = \"$username\", Password = PASSWORD(\"$password\") WHERE User = \"root\"; DELETE FROM mysql.user WHERE User = \'\'; FLUSH PRIVILEGES;' && touch $configured_marker", + command => "mysql -uroot -e 'UPDATE mysql.user SET User = \"$username\", Password = PASSWORD(\"$password\") WHERE User = \"root\"; DELETE FROM mysql.user WHERE User = \"\"; FLUSH PRIVILEGES;' && touch $configured_marker", provider => shell, creates => $configured_marker, require => Class['mysql::server'],