我在运行 Vagrant up
时遇到以下错误,谷歌后我发现有人说 puppet 最新版本不支持该选项,但不知道如何解决该问题?
==> centos7base: Running provisioner: puppet...
==> centos7base: Running Puppet with site.pp...
==> centos7base: Error: Could not parse application options: invalid option: --manifestdir
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.
Vagrant 版本:1.7.4
Vagrant 文件:
config.vm.provision "puppet" do |puppet|
puppet.facter = {
"vagrant" => "1"
}
puppet.manifests_path = ["vm", "/Vagrant/puppet"]
puppet.hiera_config_path = "puppet/hiera.yaml"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "site.pp"
end
最佳答案
您应该使用与 Vagrantfile 的位置相关的文件夹,Vagrant 足够聪明,可以自行将其挂载到实例中。
这是我的开发机器的一个工作实例的例子。其中有 vagrant/Vagrantfile,但它在与子目录相同的 vagrant/文件夹中也有用于 list 和模块的文件夹。
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.options = ['--verbose']
puppet.facter = {
"fqdn" => "vagrant-test.domain.env"
}
end
关于linux - Vagrant 错误 : Could not parse application options: invalid option: --manifestdir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31815148/