Howdy all
Running into two more issues now; still on gentoo test box.
1- init fails to start puppetd, every time, be it on boot, reboot,
start/restart. Never says why; just that it failed to start. Running
puppetd commandline works though.
2- as with the subject, I found the recipe at the bottom of
http://reductivelabs.com/trac/puppet/wiki/Recipes/SimpleText for
single-line editing based on the existence of a key within a file.
I''m trying to use this to set and maintain /etc/profiles, but, the
statements I am putting in don''t seem to be getting me anywhere.
below is code in class file:
define ensure_key_value($file, $key, $value, $delimeter = " ") {
# append line if "$key" not in "$file"
exec { "echo ''$key$delimeter$value'' >>
$file":
unless => "grep -qe
''^$key[[:space:]]*$delimeter'' -- $file",
path => "/bin:/usr/bin"
}
# update it if it already exists...
exec { "sed -i ''''
''s/^$key$delimeter.*$/$key$delimeter$value/
g'' $file":
unless => "grep -xqe
''$key[[:space:]]*$delimeter[[:space:]]*
$value'' --
$file",
path => "/bin:/usr/bin"
}
}
class edit_files {
ensure_key_value { /etc/profile:
key => "umask",
value => "022"
}
}
The class file is imported into the site.pp
The class is included in same.
My intent is to be able to add more edits into the class, once this
one is working, but, I''m a little lost...
As always, thanks!!
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---