Skip to content

Instantly share code, notes, and snippets.

@nickanderson
Created February 29, 2012 02:00
Show Gist options
  • Save nickanderson/1936938 to your computer and use it in GitHub Desktop.
Save nickanderson/1936938 to your computer and use it in GitHub Desktop.
body common control {
bundlesequence => {
"main",
"paths",
};
inputs => {
"cfengine_stdlib.cf",
};
}
bundle agent main {
methods:
"any" usebundle => report_user_crontabs;
}
bundle common paths {
vars:
"allusers" slist => getusers("","");
"paths_usercron[$(allusers)]" string => "/var/spool/cron/crontabs/$(allusers)";
}
bundle agent report_user_crontabs{
vars:
"allusers" slist => getusers("","");
reports:
cfengine::
"$(allusers) $(paths.paths_usercron[$(allusers)])";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment