I have a following Puppet class using puppetlabs/mysql
module:
class hg_playground::makowals::brains::db {
class { '::mysql::client':
package_name => 'mariadb',
}
$override_options = {
'mysqld' => {
'log-bin' => '',
'server-id' => $mysql_server_id,
}
}
class { '::mysql::server':
package_name => 'mariadb-server',
root_password => 'TESTOWY',
remove_default_accounts => true,
override_options => $override_options,
}
mysql_user { 'slave_user@localhost':
ensure => 'present',
password_hash => mysql_password('master_replication'),
}
mysql_grant { 'slave_user@localhost/*.*':
ensure => 'present',
options => ['GRANT'],
privileges => ['REPLICATION SLAVE'],
table => '*.*',
user => 'slave_user@localhost',
}
mysql_database { 'somedb':
ensure => 'present',
}
}
What happens in there is
- mariadb-server is being installed correctly
- root password to db IS NOT set
- in
/root/.my.cnf
I havepassword='TESTOWY'
- neither new user nor database are not created
Of course running agent does not produce any errors. How to start debugging in this situation? Notices from running the class don't show anything interesting:
notice /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure created
notice /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/content content changed '{md5}54dc3e561e817f9c0a376a58383eb013' to '{md5}ff09a4033f718f08f69da17f0aa86652'
notice /Stage[main]/Mysql::Server::Service/Service[mysqld]/ensure ensure changed 'stopped' to 'running'
notice /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/ensure defined content as '{md5}042e1a46bc15a260a349dbbe1bac8e71'