linux - Vagrant 错误 : Could not parse application options: invalid option: --manifestdir

标签 linux vagrant puppet

我在运行 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/

相关文章:

c++ - fatal error : botan/botan. h:没有那个文件或目录

linux 终端输出

port - 我可以通过编程方式访问 Vagrant 的自动更正端口转发吗?

bash - 'vagrant ssh -c COMMAND' 行为不同于在 'vagrant ssh' session 中运行命令

vagrant - 通过 wifi 从其他计算机访问私有(private) VM

linux - 使用 mono 在 Centos 中部署 ASP.net

linux - 从 bash 脚本中的变量读取时参数太多

php - 无所事事的权限 Symfony

ubuntu - Vagrant 不运行 puppet

linux - 在 RPM 中创建符号链接(symbolic link)