gpt4 book ai didi

puppet 应用: Could not find class for

转载 作者:行者123 更新时间:2023-12-02 00:35:57 25 4
gpt4 key购买 nike

这看起来很简单,它可以在 Vagrant 上运行,但我无法让它在 EC2 服务器上运行。

时间:

 puppet apply manifests/init.pp

错误:

 Could not find class base for s1.ec2.internal at /var/lib/jenkins/jobs/s1/workspace/manifests/init.pp:1 on node s1.ec2.internal

文件./manifests/init.pp:

include base

文件./manifests/base.pp:

class base {

exec { "apt-get update":
command => "/usr/bin/apt-get update",
timeout => 0
}

package { ["vim", "git", "build-essential"]:
ensure => present,
require => Exec["apt-get update"]
}

}

puppet v2.7.23

最佳答案

正如 Felix 所说,正在您的 puppet list 模块中查找类库。模块的目录结构如下:

$confdir/
|- manifests
|- init.pp <- The file you reference to when executing puppet apply
|- modules
|- base
|- manifests
|- init.pp <- The file containing your base class

Felix 忘记提到的是,base 模块目录中需要有另一个 list 目录。

另请参阅https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html

关于 puppet 应用: Could not find class for,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23746512/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com