我的puppet代理机器已经安装了mysql服务器。我想在该服务器上创建数据库。我的傀儡课如下
class dbtest {
mysql::db { 'mydb':
user => 'root',
password => 'malintha',
host => 'localhost',
}
这给了我错误Error: Failed to apply catalog: Could not find dependency Class[Mysql::Server] for Mysql_database[mydb]
如何解决此问题?如何导入mysql服务器依赖类
答案 0 :(得分:0)
我可以修复此问题,添加class { '::mysql::server':} to my class
class dbtest {
class { '::mysql::server':}
mysql::db { 'mydb1':
user => 'root',
password => 'malintha',
host => 'localhost',
sql => '/tmp/source.sql',
require => File['/tmp/source.sql'],
}