file {'/tmp/filetest':
content => "aaa",
ensure => file,
}
ensure => present
file {'/tmp/filetest':
content => "aaa",
}
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',}
同步文件
同步目录
recurse true,purge false,服务端文件传到客户端,客户端多的文件不会被删除
recurse true,purge true,服务端和客户端完全相同
recurse remote,只扫描服务端文件,并发送到客户端
recurse => true,recurselimit =>3 同步到第3层
recurse => true,ignore => '.svn',不同步.svn文件
多个目录同步到一个目录sourceselect=>all
同步目录,客户端存在时不覆盖,replace => false