Usually all output gets sent to the 'sysadm' address as defined in cfagent.conf. Either the diffs could be displayed in the email (ala Brendan) or you could use cfengine alerts, ie:

groups:
        etc_hosts_modifed = (
        ReturnZero(/usr/bin/diff /etc/hosts /path/to/canonical/hosts) )

alerts:
        etc_hosts_modified::
                "/etc/hosts modified!"

As far as roll back goes, most actions create backups of modified files. This allows you to at least roll back by hand, or conceivably implement a rollback feature.

Cheers,

T

Digant C Kasundra wrote:


So that could easily be expanded to call a script that would detect if
there were any diffs and then send an email, I suppose.  Or does any output
of the shell command get automatically sent to the sys admin specified?

--On Friday, March 31, 2006 1:56 PM -0600 Brendan Strejcek
<[EMAIL PROTECTED]> wrote:

 > Digant C Kasundra wrote:
 >
 > Something like this maybe:
 >
 >     copy:
 >         some_class::
 >             /path/to/canonical/file
 >                 dest=/etc/shells.desired
 >                 ...other options...
 >
 >     shellcommands:
 >         some_class::
 >             "/usr/bin/diff /etc/shells /etc/shells.desired"
 >

--
Tyson A. Tucker <[EMAIL PROTECTED]>
EMSL High Performance (UNIX) Computing & Network Services (HPCANS)
Room: Math/1144
Mail: K1-87
Phone: (509) 372-6766
Cell: (509) 308-1452
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to