Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/adblockplus/manifests/host/example.pp

Issue 29338046: Issue 3638 - Introduce type adblockplus::host (Closed)
Patch Set: Created March 9, 2016, 11:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/adblockplus/manifests/host.pp ('k') | modules/adblockplus/manifests/init.pp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/host.pp ('k') | modules/adblockplus/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld