差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
public:it:linux:puppet [2015/02/22 14:13] – [Learning Puppet 笔记] oakfire | public:it:linux:puppet [2018/02/28 13:48] (当前版本) – 外部编辑 127.0.0.1 | ||
---|---|---|---|
行 40: | 行 40: | ||
* '' | * '' | ||
* **Puppet agent/ | * **Puppet agent/ | ||
+ | === Resource Ordering === | ||
+ | * You can embed relationship information in a resource with the '' | ||
+ | * You can also declare relationships outside a resource with the '' | ||
+ | * Relationships can be either ordering (this before that) or ordering-with-notification (this before that, and tell that whether this was changed). | ||
+ | * Puppet’s relationship behaviors and syntaxes are documented in[[https:// | ||
+ | * The '' | ||
+ | === Variables, Conditionals, | ||
+ | * Variables: 语法类似 php, 但实际是常量,只能被赋值一次, 不能修改。 | ||
+ | * Conditionals: | ||
+ | * Puppet has a bunch of built-in, pre-assigned variables that you can use. | ||
+ | * Facts: [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | === Modules and Classes === | ||
+ | * Classes are named blocks of Puppet code, which can be created in one place and invoked elsewhere. | ||
+ | * Puppet 的 class 更像是宏, 但拥有变量域。 | ||
+ | * '' | ||
+ | * Modules: | ||
+ | * Modules are just directories with files, arranged in a specific, predictable structure. The manifest files within a module have to obey certain naming restrictions. | ||
+ | * Puppet looks for modules in a specific place (or list of places). This set of directories is known as the '' | ||
+ | * If a class is defined in a module, you can declare that class by name in //any manifest//. Puppet will automatically find and load the manifest that contains the class definition. | ||
+ | * 一个 module 就是一个路径, 模块名就是路径名 | ||
+ | * module layout: 模块包含子文件夹'' | ||
+ | * module 静态文件('' | ||
+ | * **puppet.conf**: | ||
+ | * The format of **puppet.conf** is explained in [[https:// | ||
+ | * [[http:// | ||
+ | === Templates === | ||
+ | * Templates are saved as files with the '' | ||
+ | * Use a template by the function '' | ||
+ | ensure => file, | ||
+ | require => Package[' | ||
+ | content => template(' | ||
+ | }</ | ||
+ | * Use a template by the function '' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||