Difference between revisions of "Cfengine: Installing packages with cfengine"
Latest revision as of 13:07, 21 November 2006
cfengine can check the installed versions of packages on a node and install or upgrade them if they are not correct. You need to tell cfengine how to interact with your favourite package manager in the control section and ensure that the packages section is in the action sequence:
control: any:: actionsequence = ( packages ) DefaultPkgMgr = ( rpm ) RPMcommand = ( /bin/rpm ) RPMInstallCommand = ( "/usr/bin/yum -y install %s" ) packages: any:: ganglia-gmond action=install grid:: lcg-CA action=install
Then all nodes get ganglia-gmond packages and grid nodes ensure they have the lcg-CA packages.
By default any installed version satisfies cfengine, but checks can be made against a specific version:
packages: grid:: lcg-CA action=install version=1.10
If the version check fails then the package install command is run - so when release 1.11 of lcg-CA is in your local mirror then just change 1.10 to 1.11 in your master cfagent.conf file and all nodes in the grid class will update themselves the next time cfengine runs - simple!