在带有“ ubuntu / bionic64”图像的Vagrant / VirtualBox上运行p时,出现以下错误:
Animal
环境:
Vagrantfile:
Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::apt-get::update for ubuntu-bionic.example.com (file: /tmp/vagrant-puppet/manifests-846018e2aa141a5eb79a64b4015et6f3/default.pp, line: 2, column: 5) on node ubuntu-bionic.example.com
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.
与...
config.vm.box = "ubuntu/bionic64"
...
config.vm.provision "shell", inline: "apt-get update && apt-get install -y puppet"
config.vm.provision "puppet" do |puppet|
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "default.pp"
puppet.options="--verbose --debug"
end
...
框一起使用的是相同的木偶配置。我唯一更改的是Vagrantfile中的ubuntu/xenial64
行(从config.vm.box
到config.vm.box = "ubuntu/xenial64"
。我还确认了我的模块存在,并且可以在vm中的vm上看到它config.vm.box = "ubuntu/bionic64"
目录。
答案 0 :(得分:0)
我能够通过将/tmp
模块重命名为apt-get
来解决此问题。
从Ubuntu Xenial转到Ubuntu Bionic将Puppet从v3.8.5升级到v5.4.0。显然,using hyphens in a module name isn't allowed(尽管它曾经可以工作)。