You want to have the class set if the promise need to be repaired (if
the file content is not right). So it's not *if_notkept* that you need
to use, but *if_repaired*
Regards
Nicolas CHARLES
Normation SAS - http://www.normation.com
44 rue Cauchy -- 94110 Arcueil, FRANCE
Standard +33 (0)1 83 62 26 96
Tél direct +33 (0)1 83 62 57 47
On 15/04/2011 16:33, Frans Lawaetz wrote:
Hi,
There are regrettable instances when one can not simply dictate a
promise but must hand off its implementation to others due to
necessary coordination with other hominids, manual processes, and the
like. I'm trying to use cf3 to nag people regarding things not being
in the agreed upon state but it doesn't seem to want to stoop to this
level.
For example, I'd like to have cf3 send an email once a day if a
particular file does not look like it's supposed to. I've tried the
following:
"/root/fakefile"
perms => system("0755","root","root"),
copy_from =>
mycopy("${g.masterfiles}/root/fakefile","${g.phost}"),
action => WarnOnly,
classes => if_notkept("warndba");
cf3 abides by the WarnOnly directive but does not activate the
"warndba" class. "warndba" would trigger in the commands: section a
"echo some warning | mail dbas"
The above approach may well be misguided but it's the only method I
can think of for accomplishing the desired outcome. Any ideas?
Also, as a feature request, specific to the "reports:" section of a
bundle, might it be possible to direct email to addresses other than
the "mailto" set in cf-execd.cf? Something like:
reports:
warndba::
"You still haven't fixed oracle configs on $(sys.uqhost)."
mailto => d...@somewhere.com;
Thanks,
Frans
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine