两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 |
public:it:linux:puppet [2015/03/02 13:57] – oakfire | public:it:linux:puppet [2018/02/28 13:48] (当前版本) – 外部编辑 127.0.0.1 |
---|
* The format of **puppet.conf** is explained in [[https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html|the configuration docs]] | * The format of **puppet.conf** is explained in [[https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html|the configuration docs]] |
* [[http://forge.puppetlabs.com/|Puppet Forge]]: 模块仓库. 使用方式:install module:<code>$ sudo puppet module install puppetlabs-mysql//forge 里模块名有用户名前缀 </code> List all installed modules:<code>$ sudo puppet module list</code> | * [[http://forge.puppetlabs.com/|Puppet Forge]]: 模块仓库. 使用方式:install module:<code>$ sudo puppet module install puppetlabs-mysql//forge 里模块名有用户名前缀 </code> List all installed modules:<code>$ sudo puppet module list</code> |
| === Templates === |
| * Templates are saved as files with the ''.erb'' extension. and be stored in the ''templates/'' directory of any module. There can be any number of subdirectories inside ''templates/''. |
| * Use a template by the function ''template'': <code> file {'/etc/foo.conf': |
| ensure => file, |
| require => Package['foo'], |
| content => template('foo/foo.conf.erb'), |
| }</code>''template''参数格式为''<MODULE NAME>/<FILENAME INSIDE TEMPLATES DIRECTORY>''. |
| * Use a template by the function ''inline_template'' |
| |
| |
| |
| |