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

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.

主站蜘蛛池模板: 廉江市| 阳朔县| 山东| 开鲁县| 榆林市| 绥宁县| 浦东新区| 德钦县| 沁水县| 高淳县| 石楼县| 凌海市| 八宿县| 青龙| 崇明县| 丰镇市| 沿河| 卢湾区| 泉州市| 饶河县| 茌平县| 瓮安县| 炉霍县| 荔浦县| 宿州市| 宜宾县| 上思县| 静乐县| 双城市| 临汾市| 白玉县| 苏尼特左旗| 乐平市| 抚顺市| 卫辉市| 鄂托克前旗| 甘孜县| 偏关县| 鄂州市| 嫩江县| 和顺县|