i am missing something here . those classes are from the same module . i am calling sharedvar::vartest class sharedvar { $vartest = 'blabla }' from template file that reside on module "newmodule"
where do i put the include class and what syntax i use to call it ? thank you :) On Wed, Jul 18, 2012 at 10:47 AM, Erik Dalén <erik.gustav.da...@gmail.com>wrote: > Make sure you include sharedvar class in your sharedvar::generic class > before the template is called. > > On 18 July 2012 09:10, Yaniv Fine <yanivf...@gmail.com> wrote: > > i have tested this again today when i arrived to the office , with no > luck . > > when calling another module (sharedvar)/mainfest/generic.pp file from > within > > my template file . > > ****************** > > class sharedvar { > > $vartest = 'test1' > > } > > ****************** > > i use in my erb file in module/mymodule/templates/bla.erb > > > > <%= scope.lookupvar('sharedvar::vartest') %> > > > > > > i get a blank line without my test1 parameter > > > > what am i doing wrong here . > > > > i can workaround this by declaring the vars in the same module that i > want > > to use them but i want it to be cross module vars . > > > > > > > > > > > > On Tue, Jul 17, 2012 at 7:09 PM, Yaniv Fine <yanivf...@gmail.com> wrote: > >> > >> Sorry . > >> My mistake . I have used the share_module:varname > >> > >> On Jul 17, 2012 7:06 PM, "Felix Frank" <felix.fr...@alumni.tu-berlin.de > > > >> wrote: > >>> > >>> Hi, > >>> > >>> On 07/17/2012 05:16 PM, Yaniv Fine wrote: > >>> > thank you for the answer . > >>> > i tried to use the " > >>> > > >>> > |scope.lookupvar(share_module::varname)" in the erb file > >>> > but got a blank line (empty value) > >>> > i will have a look on |hiera > >>> > > >>> > also , > >>> > thank you > >>> > >>> I'm fairly certain you need to quote the name of the variable you want > >>> to look up. > >>> > >>> scope.lookupvar("share_module::varname") > >>> > >>> HTH, > >>> Felix > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > Groups > >>> "Puppet Users" group. > >>> To post to this group, send email to puppet-users@googlegroups.com. > >>> To unsubscribe from this group, send email to > >>> puppet-users+unsubscr...@googlegroups.com. > >>> For more options, visit this group at > >>> http://groups.google.com/group/puppet-users?hl=en. > >>> > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/puppet-users?hl=en. > > > > -- > Erik Dalén > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.