On 03/15/2011 02:42 AM, Nigel Kersten wrote: > On Mon, Mar 14, 2011 at 11:07 AM, VinceT <vgtalus...@gmail.com> wrote: >> I'm attempting to use puppet for customing the root gecos field to use >> a template to insert the local hostname for Redhat 5.5 and Solaris >> 10. I'm using Puppet 2.6.4 with environments and modules and seeing >> trouble that looks like end of lines not being suppressed from the >> template. > > > Adding a hyphen to the closing %> is the way to suppress newlines in > ERB templates. > > <%= hostname -%>
Alternatively, just make sure there is in fact no linebreak at the end of the template. If you *do* indeed need ERB syntax (when doing something more than just including the value of a fact in a string, such as joining the fields of an array to a new string), you may want to look at the inline_template function for an easier alternative. Creating files w/o newline at EOF is a pain in the neck. HTH, Felix -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.