On Mon, Mar 14, 2011 at 11:07 AM, VinceT <[email protected]> wrote:
>
>
> class passwd {
>
> user { "root":
> ensure => present,
> comment => template("passwd/passwd.root.user.erb"),
>
> }
>
> passwd.root.user.erb contains:
>
> Root user on <%= hostname %>
>
>
For such a simple substitution, you're working too hard:
user { "root":
ensure => present,
comment => "Root user on ${hostname}";
}
Nigel's comment is spot-on, though: use <%= blah -%> to suppress the
trailing newline. If you are planning on doing much templating, you would
be well advised to read the ruby docs on ERB as they are the most complete.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
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.