[英]Puppet file type
我正在測試人偶的“文件”類型。 我添加了一個簡單的清單如下
root@pk121:/etc/puppet/manifests# cat site.pp
file { '/tmp/puppettest' :
source => "pk121.domain:///files/f1.txt",
}
嘗試申請母版,但出現以下錯誤
root@pk121:/etc/puppet/manifests# puppet apply site.pp
Notice: Compiled catalog for pk121.domain in environment production in 0.17 seconds
Error: Validation of File[/tmp/puppettest] failed: You cannot specify more than one of content, source, target at /etc/puppet/manifests/site.pp:12
Wrapped exception:
You cannot specify more than one of content, source, target
root@pk121:/etc/puppet/manifests# ls -al ../files/f1.txt
-rw-r--r-- 1 root root 19 Mar 25 14:52 ../files/f1.txt
編輯
它在本地工作正常,但仍然無法在代理上同步f1.txt,以下是主服務器上的新配置
root@pk121:/etc/puppet/environments/production/manifests# vi site.pp
node default {
file { '/tmp/puppettest' :
source => "pk121.domain:///files/f1.txt",
}
}
代理人
root@hire:~# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for hire.domain
Error: Failed to apply catalog: Parameter source failed on File[/tmp/puppettest]: Cannot use URLs of type 'pk121.domain' as source for fileserving at /etc/puppet/environments/production/manifests/site.pp:3
Wrapped exception:
Cannot use URLs of type 'pk121.domain' as source for fileserving
如果您需要任何進一步的信息,請告訴我。
您的URI格式錯誤,並嘗試將您的節點FQDN用作地址架構。
嘗試只使用香草
puppet:///files/f1.txt
可以想象在本地系統上使用puppet apply
時,您也可以將文件從一個磁盤位置同步到另一個磁盤位置。
source => 'file:///etc/puppet/files/f1.txt'
要么
source => '/etc/puppet/files/f1.txt'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.