puppet资源file资源介绍
资源的介绍
资源是puppet最基本的元素,每个资源的定义都具有标题、类型以及一系列的属性。puppet的特性就是处理资源与资源之间的依赖关系。
任何相同类型的资源都会具有一些相同的属性。
资源定义有如下的特性:
1.puppet使用title在编译时期区分每个资源,使用命名变量(namevar)在执行时区分资源。
2.在同一类资源中title和namevar都是唯一的。
3.每个类型都有部分属性有默认值
4,如果不指定namevar,则默认赋予其title的值。
file资源
Description
Manages files, including their content, ownership, and permissions.The file type can manage normal files, directories, and symlinks; the type should be specified in the ensure attribute. Note that symlinks cannot be managed on Windows systems.
File contents can be managed directly with the content attribute, or downloaded from a remote source using the source attribute; the latter can also be used to recursively serve directories (when the recurse attribute is set to true or local). On Wi