On Dec 6, 2010, at 3:55 AM, Matt Keating wrote: > How do you do a backtick inside an exec? > > eg: > > exec { "Testworld": > command => "/bin/echo hello `cat /etc/hostname` > /tmp/hello.txt", > } >
In general, you can't because that would need to be run by a shell, not by puppet. If you want to do something like that: On client) Explicitly pass that to a shell or run in a shell script On server) Use the generate() function If you want to solve that specific case, (which you probably don't) use the $hostname variable. -- 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.