diff options
Diffstat (limited to 'lib/puppet/parser/functions/require.rb')
-rw-r--r-- | lib/puppet/parser/functions/require.rb | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/puppet/parser/functions/require.rb b/lib/puppet/parser/functions/require.rb index a46999f05..45b89c77a 100644 --- a/lib/puppet/parser/functions/require.rb +++ b/lib/puppet/parser/functions/require.rb @@ -1,5 +1,8 @@ # Requires the specified classes -Puppet::Parser::Functions::newfunction(:require, + + Puppet::Parser::Functions::newfunction( + :require, + :doc =>"Evaluate one or more classes, adding the required class as a dependency. The relationship metaparameters work well for specifying relationships @@ -9,18 +12,18 @@ relationships between classes. This function is a superset of the class depends on the required class. Warning: using require in place of include can lead to unwanted dependency cycles. - For instance the following manifest, with 'require' instead of 'include' - would produce a nasty dependence cycle, because notify imposes a before - between File[/foo] and Service[foo]:: - - class myservice { - service { foo: ensure => running } - } - - class otherstuff { - include myservice - file { '/foo': notify => Service[foo] } - } + For instance the following manifest, with 'require' instead of 'include' + would produce a nasty dependence cycle, because notify imposes a before + between File[/foo] and Service[foo]:: + + class myservice { + service { foo: ensure => running } + } + + class otherstuff { + include myservice + file { '/foo': notify => Service[foo] } + } Note that this function only works with clients 0.25 and later, and it will fail if used with earlier clients. |