2014-06-11 102 views
0

我想在我的Mac(OS X)本地傀儡。我安装了最新版本的puppet,hiera和facter。我创建了以下结构傀儡申请不工作

$ find . 
. 
./files 
./manifests 
./manifests/init.pp 
./templates 

和程序hello_world /舱单/ init.pp内容的模块

$ cat manifests/init.pp 
class hello_world { 
    file {'/tmp/itworks': 
     ensure => directory, 
    } 
} 

但没有任何反应,当我运行

puppet apply hello_world/manifests/init.pp

回答

2

你定义一个类,但从来没有include它。 (该班级没有申报。)

请注意,模块通常不直接应用。相反,你申请一个显明include SA类从模块(通常,即模块的名字命名,并自动位于module_name/manifests/init.pp类。如

puppet apply -e 'include hello_world' 

注意,hello_world/目录必须位于你的$modulepath(通常/etc/puppet/modules的开源变体