我试图在带有木偶的流浪者vm上安装mysql服务器,我已经在Vagrant文件中添加了这一行
config.vm.provision "puppet"
在同一个Vagrantfile文件夹中,我已经创建了manifests文件夹,在它的文件夹中,它的default.pp包含了这个内容
class { '::mysql::server':
root_password => 'root',
remove_default_accounts => false,
override_options => $override_options
}
mysql::db { 'wordpress':
user => 'wordpress',
password => '12345',
host => 'localhost',
grant => ['ALL'],
}
但是当我执行vagrant provision
==> default: Running provisioner: puppet...
==> default: Running Puppet with default.pp...
==> default: stdin: is not a tty
==> default: Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
==> default: (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')
==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::mysql::server at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/default.pp:5 on node vagrant-ubuntu-trusty-64.hitronhub.home
==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::mysql::server at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/default.pp:5 on node vagrant-ubuntu-trusty-64.hitronhub.home
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
答案 0 :(得分:2)
puppetlabs-mysql
是一个木偶模块,这意味着它不包含在基本木偶可执行文件中。要使用它,您需要做一些事情:
modules
目录puppet module install --modulepath modules puppetlabs-mysql
将MySQL模块安装到模块目录module_path
for the puppet provisioner