This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Puppet: Resource type vs Function

hello, world.
Added by ruby 11 months ago  »  Votes: 1/1

I've spent a day to diagnose the problem and finally I found that I used a resource type as a function. Stupid :))

A function is defined by Ruby code, put in the directory 'lib'. They are Ruby-native.

A resource type is a Puppet specific. They are often defined in a module, without any Ruby code.

The way they are invoked are also so different

1 $var = this_is_a_function('value1', 'value2')
2 
3 and_there_is_a_resource_type {
4   $title: 
5     'param1' => 'value1',
6     'param2' => 'value2'
7 }

Puppet is so messy, isn't it?


Comments