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

Types

Go through the following steps to create your type:

  1. Create and distribute the type
  2. Add the namevar special attribute
  3. Add additional type properties
  4. Add the optional ensure property
  5. Add type parameters
  6. Set the property and parameter defaults
  7. Check the input value with a validate block
  8. Check the input value against a newvalues array
  9. Check datatype compatibility with munge
  10. Use AutoRequire for implicit relationships
  11. Use Arrays to list the values of an attribute
  12. Use the desc method to add inline documentation

Check out the official documentation page on Puppet types at https://puppet.com/docs/puppet/5.3/custom_types.html. Gary Larizza's blog also offers an alternative set of useful examples of types at http://garylarizza.com/blog/2013/11/25/fun-with-providers/.

Let's now go through each of these steps to create your new type in more detail in the following sections.

主站蜘蛛池模板: 东阿县| 泰州市| 平凉市| 陆丰市| 夏河县| 定兴县| 启东市| 呼和浩特市| 达州市| 庆元县| 大厂| 昂仁县| 天等县| 华安县| 大埔区| 佛坪县| 诏安县| 中卫市| 桂平市| 荥阳市| 垣曲县| 岑溪市| 永泰县| 寿阳县| 宿迁市| 历史| 桐梓县| 武义县| 华亭县| 虹口区| 平果县| 军事| 驻马店市| 祁连县| 延庆县| 常州市| 湖口县| 白朗县| 青海省| 石柱| 西昌市|