OLD | NEW |
| (Empty) |
1 # == Type: adblockplus::host::example | |
2 # | |
3 # An example on how to apply resource definitions that are specific to the | |
4 # current node's $::role, but need to recognize or correspond to a subset of | |
5 # all hosts within the same environment. One can introduce another manifest | |
6 # corresponding to the adblockplus::host::$::role pattern when integrating | |
7 # resources that are set up based on individual host information. | |
8 # | |
9 # This workaround is required due to the circumstance that module adblockplus | |
10 # must still remain Puppet 2.7 compatible, which does not feature sophisticated | |
11 # iteration over i.e. resource definitions or collectors, hence makes it very | |
12 # difficult to re-use information whilst maintaining clear abstraction. | |
13 # | |
14 # See type adblockplus::host for more information. | |
15 # | |
16 define adblockplus::host::example { | |
17 | |
18 # Puppetlab's stdlib allows for accessing host parameters | |
19 $fqdn = getparam(Adblockplus::Host[$title], 'fqdn') | |
20 | |
21 # Examplary resource without side-effects | |
22 notify {"$fqdn#example": | |
23 message => "Place definitions requiring information about host $fqdn here", | |
24 } | |
25 } | |
OLD | NEW |