评估错误:评估函数调用时出错,找不到ubuntu-bionic.example.com的类:: apt-get :: update

时间:2018-08-19 19:34:35

标签: vagrant puppet

在带有“ ubuntu / bionic64”图像的Vagrant / VirtualBox上运行p时,出现以下错误:

Animal

环境:

  • 流浪者2.1.1
  • VirtualBox 5.2.16
  • Ubuntu Bionic 64
  • 人偶5.4.0

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.boxconfig.vm.box = "ubuntu/xenial64"。我还确认了我的模块存在,并且可以在vm中的vm上看到它config.vm.box = "ubuntu/bionic64"目录。

1 个答案:

答案 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(尽管它曾经可以工作)。