summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorDan Bode <dan@puppetlabs.com>2012-08-13 18:52:56 -0700
committerJeff McCune <jeff@puppetlabs.com>2012-10-25 10:54:33 -0700
commit97d327ae44820083ed8ad127930600422faf5031 (patch)
tree2eed9e97e90567005d0f656e639652280d2524eb /lib/puppet
parent4f8b133917255451b1f28128e26b36305c23d254 (diff)
Add better docs about duplicate resource failures
This commit adds better inline documentation explaining how replicate resource definitions can occur if the resource exists and does not have matching parameters.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/ensure_resource.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb
index 8f9eadf..3205b9b 100644
--- a/lib/puppet/parser/functions/ensure_resource.rb
+++ b/lib/puppet/parser/functions/ensure_resource.rb
@@ -14,6 +14,11 @@ resource.
This example only creates the resource if it does not already exist:
ensure_resource('user, 'dan', {'ensure' => 'present' })
+
+If the resource already exists but does not match the specified parameters,
+this function will attempt to recreate the resource leading to a duplicate
+resource definition error.
+
ENDOFDOC
) do |vals|
type, title, params = vals