Skip to content

Commit 7174058

Browse files
author
Jeff McCune
committed
(#15081) Update create_resources() inline documentation
Without this patch the create_resources function inline documentation is not up to date with the patch to enable creation of virtual and exported resources. This patch fixes the problem by including examples of how to create virtual and exported resources using the create_resources function.
1 parent 7af8c6e commit 7174058

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/puppet/parser/functions/create_resources.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
3232
This function can be used to create defined resources and classes, as well
3333
as native resources.
34+
35+
Virtual and Exported resources may be created by prefixing the type name
36+
with @ or @@ respectively. For example, the $myusers hash may be exported
37+
in the following manner:
38+
39+
create_resources("@@user", $myusers)
40+
41+
The $myusers may be declared as virtual resources using:
42+
43+
create_resources("@user", $myusers)
44+
3445
ENDHEREDOC
3546
raise ArgumentError, ("create_resources(): wrong number of arguments (#{args.length}; must be 2 or 3)") if args.length < 2 || args.length > 3
3647

0 commit comments

Comments
 (0)