Mercurial > repos > other > Puppet
changeset 27:25405d1350ef puppet-3.6
Remove unnecessary log directory creation and try to fix SQL statement
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 09 Mar 2015 03:30:18 +0000 |
parents | 58d1818c2ded |
children | 2078241de4ed |
files | modules/website/manifests/mysql.pp |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/website/manifests/mysql.pp Mon Mar 09 01:34:59 2015 +0000 +++ b/modules/website/manifests/mysql.pp Mon Mar 09 03:30:18 2015 +0000 @@ -27,17 +27,11 @@ } }, } - file { '/var/log/mysql': - ensure => directory, - owner => 'mysql', - group => 'mysql', - require => Class['mysql::server'], - } $username = strip($mysqluser) $password = strip($mysqlpassword) $configured_marker = '/etc/mysql/.is-configured' exec { 'Rename root MySQL user for security': - 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", + 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", provider => shell, creates => $configured_marker, require => Class['mysql::server'],