From: Dan Bode Date: Tue, 14 Aug 2012 01:52:56 +0000 (-0700) Subject: Add better docs about duplicate resource failures X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=222a65dfe23e15561369474b8db939aebf07bca4;p=puppet-stdlib.git 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. --- 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