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.
class passwd { user { "root": ensure => present, comment => template("passwd/passwd.root.user.erb"), } passwd.root.user.erb contains: Root user on <%= hostname %> I get the following when I try to run on my clients: Redhat 5.5: err: /Stage[main]/Passwd/User[root]/comment: change from Root user on brm-ut-linclient-1 to "Root user on brm-ut-linclient-1 " failed: Could not set comment on user[root]: Execution of '/usr/sbin/ usermod -c "Root user on brm-ut-linclient-1 " root' returned 3: usermod: invalid field '"Root user on brm-ut- linclient-1 " Solaris 10: err: /Stage[main]/Passwd/User[root]/comment: change from SunOS Super- User on brm-ut-sol10client-1 to "Root user on brm-ut-sol10client-1 " failed: Could not set comment on user[root]: Execution of '/usr/sbin/ usermod -c "Root user on brm-ut-sol10client-1 " root' returned 2: UX: /usr/sbin/usermod: ERROR: Invalid syntax. usage: usermod -u uid [-o] | -g group | -G group[[,group]...] | -d dir [-m] | -s shell | -c comment | -l new_logname | -f inactive | -e expire | -A authorization [, authorization ...] | -K key=value ... | -P profile [, profile ...] | -R role [, role ...] login -- So it looks like the newlines are breaking these - is there a way to suppress them or a better way to templatize this? We're fairly new to puppet... Thanks, Vince -- 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.