2015-04-18 44 views
-3

類印度我創建了一個名爲巴拉斯如下模塊..找不到戲夢人生

$ pwd 
>> /etc/puppetlabs/puppet/modules 

$ ls -lrth 
>> total 8.0K 
>> drwxr-xr-x 6 root root 4.0K Apr 18 08:01 motd 
>> drwxr-xr-x 6 root root 4.0K Apr 18 13:09 bharath 

$ cd bharath/ 

$ ls -lrt 
>> total 16 
>> drwxr-xr-x 2 root root 4096 Apr 18 12:59 templates 
>> drwxr-xr-x 2 root root 4096 Apr 18 13:10 files 
>> drwxr-xr-x 2 root root 4096 Apr 18 13:15 manifests 
>> drwxr-xr-x 2 root root 4096 Apr 18 13:16 tests h 

$ cat manifests/init.pp files/india1 tests/init.pp 

class india { 

    file { '/root/india1': 
    ensure => 'file', 
    source => 'puppet:///modules/bharath/india1', 
    } 
} 

india is grat country --> files/india1 content  
include india --> tests/init.pp content 

但是還是我得到誤差below..eventhough我stie.pp節點分類指導補充類印度以及。

$ cd tests 
$ puppet apply --noop init.pp 

>> Error: Could not find class india for uppetmaster.bharathkumarraju.com on node uppetmaster.bharathkumarraju.com 
>> Error: Could not find class india for uppetmaster.bharathkumarraju.com on node puppetmaster.bharathkumarraju.com 
+0

這是很不清楚發生了什麼事情。你用多個文件名參數來粘貼'cat'的輸出。然後你顯然在輸出中添加註釋。不要做那些事情! –

回答

0

當使用puppet apply你需要設置你的modulepath在命令行上。

$ puppet apply --modulepath /path/to/modules --noop init.pp 

由於@FelixFrank說,你應該重新格式化您的問題更清楚你的要求,以及更好的閱讀你cat「荷蘭國際集團的文件。

希望這會有幫助