diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 10:57:45 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 10:57:45 -0700 |
commit | c2573298a5a58ca902d1d04ca2f91dd85bef6581 (patch) | |
tree | edb57c2cf326241c762052ab6431d96f464f6033 /lib/puppet/parser | |
parent | 699d520e72014a3a17395c52c04f5b521d1318e6 (diff) | |
parent | 9fc3063ea954bbd49cd2b8386bc69696a4af4114 (diff) |
Merge branch 'maint/2.5.x/pick_explicitly_load_functions' into maint/2.5.x/pick_compatible_new_functionality
* maint/2.5.x/pick_explicitly_load_functions:
Explicitly load functions used by ensure_resource
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/ensure_resource.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb index 6a9e2ed..fba2035 100644 --- a/lib/puppet/parser/functions/ensure_resource.rb +++ b/lib/puppet/parser/functions/ensure_resource.rb @@ -25,9 +25,11 @@ ENDOFDOC raise(ArgumentError, 'Must specify a type') unless type raise(ArgumentError, 'Must specify a title') unless title params ||= {} + Puppet::Parser::Functions.function(:defined_with_params) if function_defined_with_params(["#{type}[#{title}]", params]) Puppet.debug("Resource #{type}[#{title}] not created b/c it already exists") else + Puppet::Parser::Functions.function(:create_resources) function_create_resources([type.capitalize, { title => params }]) end end |