file {'/tmp/filetest':
content => "aaa",
ensure => file,
}
ensure => present
file {"":
ensure
path
content
file {"/tmp/filetest":
content => "wess",
ensure => absent,
file {"/tmp/s":ensure => directory,}
删除目錄: file {"/tmp/s": ensure => directory,force => true,}
符号連接配接: file {'/tmp/testfile':ensure => link,target => '/tmp/ssss',}
同步檔案
image.png
同步目錄
recurse true,purge false,服務端檔案傳到用戶端,用戶端多的檔案不會被删除
recurse true,purge true,服務端和用戶端完全相同
recurse remote,隻掃描服務端檔案,并發送到用戶端
recurse => true,recurselimit =>3 同步到第3層
recurse => true,ignore => '.svn',不同步.svn檔案
多個目錄同步到一個目錄sourceselect=>all
同步目錄,用戶端存在時不覆寫,replace => false