Comments in line. On Tuesday, July 17, 2012 8:24:46 AM UTC-5, Yaniv Fine wrote: > > > Hi Team . > > i am trying to use "Out-of-Scope Variables" > trying to setup kind of like an "answer" file that would be global file > for other modules to use .like 40 variables . > and call the variables from template or manifest file . > > lets say i have module share_module/mainfest/init.pp > $var1 = 'test1' > $var2 ='test2' > $ ........ > > > i would like to use "share_module/mainfest/init.pp " > > from another module , lets say apache module/template/ssl.erb file > witch some of the faribles there are the same in all my servers and some > deffer and i would the answer file to be centralized place i can manage the > vars . > > This can be done if you do something like
scope.lookupvar(share_module::varname) in the ERB. Honestly though, I would use hiera for this, it's cleaner. In the .pp calling the template you can do something like: $myvar = hiera('test1') then just reference myvar in the template as a normal variable. any pointers is much appreciated . > > > Thank You > Yaniv Fine > > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/xbGfZaxVlPoJ. 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.