diff options
author | Dan Bode <dan@puppetlabs.com> | 2012-08-13 18:52:56 -0700 |
---|---|---|
committer | Dan Bode <dan@puppetlabs.com> | 2012-08-13 18:52:56 -0700 |
commit | 222a65dfe23e15561369474b8db939aebf07bca4 (patch) | |
tree | 049c28206d87584290b7b3d0bc7d998a009fec52 | |
parent | fe85f467c8f8e65c9fd09acff17ac4adb80f12b8 (diff) | |
download | puppet-stdlib-222a65dfe23e15561369474b8db939aebf07bca4.tar.gz puppet-stdlib-222a65dfe23e15561369474b8db939aebf07bca4.tar.bz2 |
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.
-rw-r--r-- | lib/puppet/parser/functions/ensure_resource.rb | 5 |
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 |