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

Summary

Classes and defined types are the essential tools to create reusable Puppet code. While classes hold resources that must not be repeated in a manifest, the define is capable of managing a distinct set of adapted resources upon every invocation. It does that by leveraging the parameter values it receives. While classes do support parameters as well, there are some caveats to bear in mind.

To use defined types in your manifest, you declare instances just like resources of native types. Classes are mainly used through the include statement, although there are alternatives such as the class { } syntax or the contain function.

There are also some ordering issues with classes that the contain function can help mitigate.

In theory, classes and defines suffice to build almost all the manifests that you will ever need. In practice, you will want to organize your code into larger structures. The next chapter will show you how to do exactly that, and introduce you to a whole range of useful functionality beyond it.

主站蜘蛛池模板: 贵定县| 同德县| 外汇| 神木县| 合江县| 惠水县| 新建县| 法库县| 岳池县| 陵川县| 仙游县| 台中县| 中阳县| 永兴县| 贵德县| 珲春市| 横山县| 佛教| 汤原县| 盘山县| 利辛县| 防城港市| 富民县| 丰宁| 湛江市| 济南市| 奉化市| 宁强县| 宕昌县| 丰台区| 乌审旗| 富锦市| 大城县| 墨脱县| 嵊泗县| 金湖县| 长子县| 黎平县| 淮滨县| 泰宁县| 沙雅县|