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

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.

主站蜘蛛池模板: 桓台县| 会理县| 井冈山市| 库伦旗| 石城县| 遵义市| 德钦县| 黑水县| 奇台县| 平遥县| 安远县| 栾川县| 丹江口市| 哈巴河县| 瓦房店市| 七台河市| 剑阁县| 合江县| 防城港市| 隆昌县| 定陶县| 扎鲁特旗| 威宁| 天水市| 南投县| 唐海县| 丰镇市| 鹤庆县| 宿松县| 麻江县| 偏关县| 乐亭县| 浮山县| 崇明县| 北川| 望城县| 泾川县| 津南区| 民县| 环江| 九江县|