If you are using Cfengine and use RCS to store your cfagent.conf file, you could use your RCS version control number inside Cfengine.
Example on editfiles:
{ /etc/screenrc
Append "#CFEngine: $(RCSRev)"
Append "vbell off"
}
The $(RCSRev) will hold the current RCS version number. So you will distribute the version of cfagent.conf in your files.
I had some problems to get this working, therefore an little guide for other guys around the net:
Precondition: cfagent.conf is controlled via SVN
Add the following code to your
control selection:
RCSRev = ( ExecShellResult("/bin/echo \"$Id: $\" | /usr/bin/cut -f3 -d \" \" " ) )
Save your
cfagent.conf and run
svn propset svn:keywords "Id" cfagent.conf && svn -m "RCS" commit cfagent.conf.
This command tells subversion that svn should replace $Id: $ with the current RCS version and commit it.
If you open your
cfagent.conf again, you will notice that the line above changed to:
RCSRev = ( ExecShellResult("/bin/echo \"$Id: cfagent.conf 20 2009-02-03 18:21:33Z jonas $\" | /usr/bin/cut -f3 -d \" \" " ) )
That's all - you can now use $(RCSRev) inside your
cfagent.conf.