Henry,
On Tue, Sep 28, 2010 at 9:12 AM, CraftyTech <hmmed...@gmail.com> wrote: > Hello All, > > How do I specify a variable that has a space in it? I'm trying > to setup a yum repo that has two different baseurl's based on the > product name ($productname). Default goes one way, but if the product > is "PowerEdge 2650" then is a different URL. The thing is, that is > only picking up the default. How should I specify the value with the > space in the middle? I tried "PowerEdge 2650", "${PowerEdge 2650}", > and 'PowerEdge 2650', and none have worked so far. Do I need to use > Regex for this, or is there a discreprancy in my syntax? > > The baseurl you use has a white space on it? e.g. " http://yourserver/somelocation/RPMS.poweredge 2650" ? If that's not the case then you can simply do an assignment of the repo name to whatever you have based on the productname(assuming this is provided by facter) variable. $reponame = $productname ? { "PowerEdge 2650" => "poweredge2650", "PowerEdge 2950" => "poweredge2950", default => "poweredge", } Then use it in the baseurl attribute of yumrepo: baseurl => "http://yourserver/somelocation.RPMS.$reponame" Hope that helps. > Thanks, > > Henry > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- Tony http://blog.tonyskapunk.net -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.