Matthew Arguin
2011-Nov-30 14:30 UTC
Re: [Puppet Users] Digest for puppet-users@googlegroups.com - 9 Messages in 8 Topics
I am currently troubleshooting an issue where i cannot get a variable that i am setting in templates.pp in a node definition, then inheriting that def in to a specific node in the nodes.pp and calling the variable as part of a source path in the init.pp for a module...the varibale is not expanding and i am left with a blank spot in the path. I am sure tha ti am doing something stupid that i am not seeing but i ...can''t see where... i am running puppet 2.6.9 with passenger on Centos 5 below are the sections of the various pp files, any thoughts appreciated: templates.pp node newsandbox inherits qaenv { $environment="sandbox" puppet::client_environment { "sandbox": puppet_env => "sandbox", } #These started out not commented out but i commented them and tried putting them in the nodes.pp #$verEnvironment = "3.3" #$verServices = ''3.2'' #$verScripts = ''3.3'' #$verTcconfig = "3.3" $mbtradingConn = "false" $mbtradingPriceConn = "false" $mbtradingHost = "" $mbtradingPort = "" $mbtradingSSL = "" $mbtradingUser = "" $mbtradingPass = "" $mbtradingAcct = "" $mbtradingPriceLocator = "mbTradingUrlBasedQuoteApiLocator" $mbtradingPriceUser = "" $mbtradingPricePass = "" nodes.pp node ''s1-sandbox.qa.currensee.com'' inherits newsandbox { #this client_id worksbut not the ones below that i commented out in the templates.pp $ls_client_id="123456789" $verEnvironment=''3.3'' $verServices=''3.2'' $verScripts=''3.3'' $verTcconfig=''3.3'' #include newcurrensee::tc include newcurrensee::lightstreamer include newcurrensee::httpbind include dellomsa::client include newcurrensee::solr include newcurrensee::mt4 include newcurrensee::forexpert newcurrensee (init.pp) file { "/home/currensee/check-all.sh": mode => 644, owner => currensee, group => currensee, replace => true, source => "puppet:///newcurrensee/$verScripts/scripts/check-all.sh", require => User["currensee"], } -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2011-Dec-02 14:06 UTC
[Puppet Users] Re: Digest for puppet-users@googlegroups.com - 9 Messages in 8 Topics
On Nov 30, 8:30 am, Matthew Arguin <matthewarg...@gmail.com> wrote:> I am currently troubleshooting an issue where i cannot get a variable > that i am setting in templates.pp in a node definition, then > inheriting that def in to a specific node in the nodes.pp and calling > the variable as part of a source path in the init.pp for a > module...the varibale is not expanding and i am left with a blank spot > in the path. I am sure tha ti am doing something stupid that i am not > seeing but i ...can''t see where... i am running puppet 2.6.9 with > passenger on Centos 5 below are the sections of the various pp files, > any thoughts appreciated: > > templates.pp > > node newsandbox inherits qaenv { > > $environment="sandbox" > puppet::client_environment { "sandbox": > puppet_env => "sandbox", > } > > #These started out not commented out but i commented them and tried > putting them in the nodes.pp > #$verEnvironment = "3.3" > #$verServices = ''3.2'' > #$verScripts = ''3.3'' > #$verTcconfig = "3.3" > > $mbtradingConn = "false" > $mbtradingPriceConn = "false" > $mbtradingHost = "" > $mbtradingPort = "" > $mbtradingSSL = "" > $mbtradingUser = "" > $mbtradingPass = "" > $mbtradingAcct = "" > $mbtradingPriceLocator = "mbTradingUrlBasedQuoteApiLocator" > $mbtradingPriceUser = "" > $mbtradingPricePass = "" > > nodes.pp > node ''s1-sandbox.qa.currensee.com'' inherits newsandbox { > #this client_id worksbut not the ones below that i commented out > in the templates.pp > $ls_client_id="123456789" > $verEnvironment=''3.3'' > $verServices=''3.2'' > $verScripts=''3.3'' > $verTcconfig=''3.3'' > > #include newcurrensee::tc > include newcurrensee::lightstreamer > include newcurrensee::httpbind > include dellomsa::client > include newcurrensee::solr > include newcurrensee::mt4 > include newcurrensee::forexpert > > newcurrensee (init.pp) > > file { "/home/currensee/check-all.sh": > mode => 644, > owner => currensee, > group => currensee, > replace => true, > source => "puppet:///newcurrensee/$verScripts/scripts/check-all.sh", > require => User["currensee"], > }It would help if you could reduce all that to a minimal error case. In fact, the exercise of performing such a reduction might be enough for you to find a solution. Nevertheless, one thing you can try would be to switch back to using global variables in template.pp and spell your source path like this: source => "puppet:///newcurrensee/${::verScripts}/scripts/check- all.sh" John -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.