Macos 木偶不工作
我正试图在我的mac(OS X)中本地进行傀儡操作。我安装了最新版本的puppet、hiera和facter。我创建了一个具有以下结构的模块Macos 木偶不工作,macos,puppet,Macos,Puppet,我正试图在我的mac(OS X)中本地进行傀儡操作。我安装了最新版本的puppet、hiera和facter。我创建了一个具有以下结构的模块 $ find . . ./files ./manifests ./manifests/init.pp ./templates 以及hello_world/manifests/init.pp的内容 $ cat manifests/init.pp class hello_world { file {'/tmp/itworks': en
$ find .
.
./files
./manifests
./manifests/init.pp
./templates
以及hello_world/manifests/init.pp的内容
$ cat manifests/init.pp
class hello_world {
file {'/tmp/itworks':
ensure => directory,
}
}
但是,当我运行puppet apply hello_world/manifests/init.pp时,什么也不会发生。您定义了一个类,但从未包含它。(未声明该类。)
$ cat manifests/init.pp
class hello_world {
file {'/tmp/itworks':
ensure => directory,
}
}
puppet apply hello_world/manifests/init.pp
请注意,模块通常不直接应用。相反,您应用一个清单,该清单包含模块中的一个类(通常是以模块命名并自动位于module\u name/manifests/init.pp
)
puppet apply -e 'include hello_world'
请注意,hello\u world/
目录必须位于您的$modulepath
(对于开源变体,通常是/etc/puppet/modules
。您可以尝试:
木偶应用-e“包括hello_world”
或者进行一次试运行
木偶应用-e'包括hello_world'--noop
有关应用的更多信息,请参阅手册页: