This works when using the variable inside a template. But I want to use the variable in an Exec command. How to remove the newline here? .chomp does not seem to work here.
THanks On Sunday, December 26, 2010 1:43:26 PM UTC+1, bowlby wrote: > > Thanks, both of you! That solved it. > > Merry Christmas (for what's left of it...) > > > > On Dec 26, 12:54 pm, Daniel Pittman <[email protected]> wrote: > > On Sun, Dec 26, 2010 at 22:45, bowlby <[email protected]> wrote: > > > I have this in nodes.pp > > > $puppetmaster_fqdn = generate("/usr/bin/facter","fqdn") > > > > > and this in a template > > > http://<%= puppetmaster_fqdn %>:8080 > > > > > When puppet runs, this is the result: > > >http://puppet.home > > > :8080 > > > > > Anybody any clue to whats causing this? I've tried -%> > > > > I suspect that -%> only eats whitespace outside the bracket, not > > inside. Anyhow, you can make this do the right thing using a tiny bit > > of ruby: <%= puppetmaster_fqdn.chomp %> > > > > Regards, > > Daniel > > -- > > ✣ Daniel Pittman ✉ [email protected] ☎ +61 401 > 155 707 > > ♽ made with 100 percent post-consumer electrons -- 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/-/AECI05CiIRYJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
