官术网_书友最值得收藏!

Summary

A template is a frequent occurrence and is one of the best ways for Puppet to manage dynamic file content. Evaluating each template requires extra effort from the compiler, but the gain in flexibility is usually worth it. Variables in templates have to be declared using any of the three available scope lookup notations.

The concept of virtual resources is much less ubiquitous. Virtual resources allow you to flexibly add certain entities to a node's catalog. The collector syntax that is used for this can also be used to override attribute values, which works for non-virtual resources as well.

Once PuppetDB is installed and configured, you can also export resources so that other node manifests can receive their configuration information. This allows you to model distributed systems quite elegantly.

The resource defaults are just a syntactic shortcut that help keep your manifest concise. They have to be used with care, though. Some language features such as the defined function (and its module-based successor, which is the ensure_resource function) should be avoided if possible.

The next chapter gives you an overview and introduction to some of the new and enhanced features in the milestone Puppet 4 release.

主站蜘蛛池模板: 寿宁县| 鸡东县| 浦北县| 呈贡县| 遂平县| 大埔区| 舒城县| 洱源县| 长治市| 莒南县| 镇原县| 全南县| 四会市| 吉隆县| 兴隆县| 延寿县| 日土县| 南漳县| 应用必备| 弋阳县| 项城市| 疏勒县| 安泽县| 交城县| 河曲县| 讷河市| 武平县| 九江市| 漳浦县| 永清县| 乐东| 开鲁县| 苏尼特右旗| 乌兰浩特市| 南丰县| 望江县| 武夷山市| 武夷山市| 朝阳市| 佛坪县| 宜春市|