it would be some::fun_setup::sname or more specifically
:: some::fun_setup::sname or $:: some::fun_setup::sname

On 7 November 2014 05:30, <w...@stanford.edu> wrote:

> In puppet 2.7 we use the following construct.
>
> define some::fun(
>   ensure => present,
>   sname => 'some.server.com'
> ) {
>   include some::fun_setup
>   # Template uses sname
>   file {"/path/$name":
>     content => template("${name}.erb"),
>   }
> }
>
> class some::fun_setup {
>   file{"/etc/ssl/certs/${sname}":
>     source => "puppet:///modules/some-files/${sname}.ca.pem"
>   }
> }
>
> The reference to sname in some::fun_setup does not work in puppet 3.  Not
> surprising given the scoping changes.  The problem is I am not sure how to
> reference sname defined in the resource from the class some::fun_setup.  In
> reading the documentation I think something like $some::fun::sname should
> work, but it doesn't.  What is the correct way to reference sname from
> some::fun_setup?
>
> The goal is to be able to have manifests that use some::fun as follows:
>
>   some::fun{'fragment1': ensure => present}
>   some::fun{'fragment2': ensure => present}
>   ...
>
> The fragments are unique, but the ca cert only needs to be installed once.
>
> Thanks in advance,
>
> Bill
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/affc1a19-64fa-4393-8b17-2b5773eec1ab%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/affc1a19-64fa-4393-8b17-2b5773eec1ab%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAN4dctoehFMp4njoQ7kEDL5KBLfvAXho9_LxDMeHCLqJdLwsVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to