c9c5eb3fd1
The dependency of creating the root .my.cnf file is a command which requires the .my.cnf file. This patch removes that dependency. Without removing the dependency, if a user already has a mysql server installed with a root password and no root .my.cnf file, the module application will fail.
20 lines
460 B
Puppet
20 lines
460 B
Puppet
#
|
|
class mysql::server::root_password {
|
|
|
|
$options = $mysql::server::options
|
|
|
|
# manage root password if it is set
|
|
if $mysql::server::root_password != 'UNSET' {
|
|
mysql_user { 'root@localhost':
|
|
ensure => present,
|
|
password_hash => mysql_password($mysql::server::root_password),
|
|
}
|
|
|
|
file { "${::root_home}/.my.cnf":
|
|
content => template('mysql/my.cnf.pass.erb'),
|
|
owner => 'root',
|
|
mode => '0600',
|
|
}
|
|
}
|
|
|
|
}
|