Fabrice Bacchella
unread,Sep 6, 2012, 7:26:39 AM9/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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 ?