代码之家  ›  专栏  ›  技术社区  ›  Collin Krawll

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

  •  -1
  • Collin Krawll  · 技术社区  · 7 年前

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

    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.
    

    环境:

    • 流浪汉2.1.1
    • 虚拟盒子5.2.16
    • Ubuntu仿生64

    流浪者档案:

    ...
    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
    ...
    

    ubuntu/xenial64 盒子。我唯一改变的就是 config.vm.box 我的流浪者档案中的行(来自 config.vm.box = "ubuntu/xenial64" config.vm.box = "ubuntu/bionic64" /tmp 目录。

    1 回复  |  直到 7 年前
        1
  •  0
  •   Collin Krawll    7 年前

    我通过重新命名 apt-get 模块到 apt_get .

    从Ubuntu Xenial到Ubuntu Bionic,Puppet从v3.8.5到v5.4.0。显然地, using hyphens in a module name isn't allowed

    推荐文章