# DEBUT cfagent.conf


#################################################
control:

  any::

    ## How and Where do we output stuff?
    sysadmin = ( alexandre.racine@mhicc.org )
    OutputPrefix = ( "cfengine" )


    ## Set some defaults
    ExpireAfter = ( 30 ) # Don't let cfengine run longer then x minutes.
    domain = ( ExecResult(/bin/hostname -d) ) # Obtain our domain name automatically

    # Where is the good stuff
    policyhost = ( dev4.rg.local )
    workdir = ( /var/cfengine )
    rootfolder = ( /masterfiles/cfengine/rootfolder )
    PortageInstallCommand = ( "/usr/lib/portage/bin/emerge --color=n %s" )
#    PortageInstallCommand = ( "ZZZZ" )



    actionsequence = ( copy packages editfiles shellcommands )



#################################################
copy:

$(rootfolder)/etc	dest=/etc
			r=inf
			server=$(policyhost)




#################################################
packages:


#    PortageInstallCommand = ( "/usr/lib/portage/bin/emerge --color=n %s" )

#	net-analyzer/nmap	cmp=gt	version=4.20	action=install
#	=net-analyzer/nmap-4.20 action=install
>=net-analyzer/nmap-4.20 cmp=ge version=4.20 action=install
		define=joejoe
		elsedefine=peter

#>=net-analyzer/nmap-4.20 cmp=ge version=4.20 action=install


#################################################
editfiles:

gentoo::
	{ /var/spool/cron/crontabs/root
	AutoCreate
	AppendIfNoSuchLine "0,15,30,45 * * * */var/cfengine/bin/cfexecd F"
	}


#################################################
shellcommands:

joejoe::
	"/bin/echo JOEJOE"

peter::
	"/bin/echo PETER"

notexisting::
	"/bin/echo WHAT"











## FIN cfagent.conf

