2016-02-23 51 views
0

我已經在過去做過。我不知道爲什麼我不能在下面這樣做。我正在使用CentOS 7作爲Puppet Master服務器。我正在使用Windows Server 2012和Puppet Agent。如何使用Puppet Agent在Windows服務器上運行Puppet Manifest?

以下所有內容均取自Puppet Master服務器。下面是site.pp(這是在/ etc /木偶/艙單):

node 'fqdnOfWindowsServer' { import 'good.pp'} 

node 'fqdnOfLinuxServer' {} 

這裏是good.pp(這是在/ etc /木偶/艙單):

file { 'c:/fun.ps1': 
     ensure => 'present', 
     source => '/tmp/special.ps1', 
     source_permissions => 'ignore', 
} 

這裏被當我運行木偶代理-t時會發生什麼:

...Caching catalog for fqdnOfLinuxServer... Error: Failed to apply catalog: Parameter path failed on File[c:/fun.ps1]: File paths must be fully qualified, not 'c:/fun.ps1' at /etc/puppet/manifests/good.pp:5

如何輸入完全限定的路徑?作爲Puppet Agent的Windows服務器似乎有問題。路徑與Linux Puppet Agent不同。

回答

1

從我所能提供的錯誤信息中,您嘗試在Linux服務器上創建Windows文件資源(該錯誤提到了fqdnOfLinuxServer的高速緩存目錄)。如果是這樣的話,錯誤信息是有道理的,因爲在Linux上,代理期望文件路徑以正斜槓開始。

相關問題