Welcome to the new Linux Foundation Forum!

Puppet - mysql module not pulling “my.cnf” from fileserver

Trying to deploy mySQL puppet. Using "Puppetlabs-MySQL" module.

My puppetmaster'd pp has

node 'jira.oracle' { class {'mysql::server':} }

class mysql::server {

package { "mysql-server": ensure => installed }

package { "mysql": ensure => installed }

service { "mysqld":

enable => true,

ensure => running,

require => Package["mysql-server"],

}

file { "/var/lib/mysql/my.cnf":

owner => "mysql", group => "mysql",

source => "puppet:///fs/my.cnf",

notify => Service["mysqld"],

require => Package["mysql-server"],

}

file { "/etc/my.cnf":

require => File["/var/lib/mysql/my.cnf"],

ensure => "/var/lib/mysql/my.cnf",

}

exec { "set-mysql-password":

unless => "mysqladmin -uroot -p$mysql_password status",

path => ["/bin", "/usr/bin"],

command => "mysqladmin -uroot password $mysql_password",

require => Service["mysqld"],

}

}

and fileserver.conf has

# MOUNT POINTS

[fs]

path /etc/puppet/environments/production/modules

allow *

But agent is still not pulling "my.cnf" from puppet master with errors:

"Error: /Stage[main]/Mysql::Server/File[/var/lib/mysql/my.cnf]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///fs/my.cnf

Notice: /Stage[main]/Mysql::Server/File[/etc/my.cnf]: Dependency File[/var/lib/mysql/my.cnf] has failures: true

Warning: /Stage[main]/Mysql::Server/File[/etc/my.cnf]: Skipping because of failed dependencies

Notice: /Stage[main]/Mysql::Server/Service[mysqld]: Dependency File[/var/lib/mysql/my.cnf] has failures: true

Warning: /Stage[main]/Mysql::Server/Service[mysqld]: Skipping because of failed dependencies

Notice: /Stage[main]/Mysql::Server/Exec[set-mysql-password]: Dependency File[/var/lib/mysql/my.cnf] has failures: true

Warning: /Stage[main]/Mysql::Server/Exec[set-mysql-password]: Skipping because of failed dependencies

Notice: Finished catalog run in 0.51 seconds"

Help appreciated. Thank you.

Sign In or Register to comment.