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

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.

主站蜘蛛池模板: 大化| 蛟河市| 涟水县| 芜湖县| 石阡县| 榆社县| 横峰县| 化隆| 阜宁县| 梁山县| 会宁县| 宣化县| 通化市| 大城县| 文水县| 荣昌县| 永顺县| 巫山县| 济源市| 济阳县| 锡林浩特市| 鹤山市| 涪陵区| 阳西县| 绍兴县| 新乐市| 成都市| 曲阜市| 巢湖市| 广汉市| 庐江县| 资阳市| 天全县| 屯门区| 济源市| 阳新县| 诸城市| 建平县| 郧西县| 镇平县| 长治县|