[英]Install mysql with puppet on vagrant vm
我正在嘗試使用puppet在無業游民的vm上安裝mysql服務器,我在無業游民的文件上添加了這一行
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.
puppetlabs-mysql
是一個puppet模塊,這意味着它不包含在基本puppet可執行文件中。 要使用它,您需要做一些事情:
modules
目錄以保存人偶模塊 puppet module install --modulepath modules puppetlabs-mysql
將MySQL模塊安裝到modules目錄中 module_path
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.