On Tuesday, March 5, 2013 1:07:37 PM UTC-6, Corey Osman
wrote:>
> Hi,
>
>
> I have been following this new type of style, using parameterized classes
> but I have a question.
>
>
>
> Say I have the following:
>
>
> class java-app-profile { class {''java-app'': app-name
=> "my_first_app1",
> app-dir => ''/opt/company/my_first_app1'', }
> class {''java-app'':
> app-name => "my_first_app2", app-dir =>
''/opt/company/my_first_app1'',
> }
> class {''java-app'':
> app-name => "my_first_app3", app-dir =>
''/opt/company/my_first_app1'',
> }
> }
>
> Can I declare multiple parameterized classes of the same type within a
> single class?
>
> No, classes are singletons, they can only be declared once.
In this situation, you should be using a defined type
- http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html
They look like paramaterized classes, but are more like the built in types
(user, file, package etc)
> Reference: http://docs.puppetlabs.com/guides/parameterized_classes.html
>
>
>
> Thanks,
>
> Corey Osman
> co...@logicminds.biz <javascript:>
>
> Green IT and Data Center Automation Specialist
>
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.