I tried to conditionally run etckeeper at the end of a puppet run.
For that I defined the following class :
class os::etckeeper::commit {
$cmd = "$operatingsystem" ? {
'debian' => '/usr/sbin/etckeeper',
default => '/usr/bin/etckeeper',
}
exec {"etckeeper commit":
command => "${cmd} commit -m 'puppet run'",
cwd => "/etc",
provider => 'posix',
returns => [0,1],
refreshonly => true,
}
File <| |> ~> Exec['etckeeper commit']
User <| |> ~> Exec['etckeeper commit']
Group <| |> ~> Exec['etckeeper commit']
Service <| |> ~> Exec['etckeeper commit']
}
But with the file selector, it fails with :
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
undefined method `<<' for {}:Hash on node mynode
If I removed only this one, everything is fine.
What might prevent the file selector to work ?
Is that a bug in puppet or in my head ?
--
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.