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

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.

主站蜘蛛池模板: 绍兴市| 常熟市| 雅江县| 新宾| 隆林| 原平市| 农安县| 文安县| 故城县| 大方县| 庆云县| 浦东新区| 方山县| 礼泉县| 通河县| 海林市| 皮山县| 栾川县| 鹿邑县| 康平县| 崇州市| 轮台县| 镇赉县| 金溪县| 台南市| 乳山市| 石柱| 漠河县| 上高县| 周口市| 垫江县| 定日县| 柯坪县| 潜江市| 凤山县| 秀山| 兴隆县| 霍城县| 泸西县| 峨眉山市| 资阳市|