help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to install a package uninstalled with cfengine???


From: Chip Seraphine
Subject: Re: how to install a package uninstalled with cfengine???
Date: Mon, 19 Jul 2004 08:20:40 -0500
User-agent: KMail/1.5.4

Check out the 'packages:' stuff in the cfengine reference (http://
www.cfengine.org/docs/cfengine-Reference.html).  

You will want to do something like this (in this example, to make sure nedit 
v5.4 or later is installed):

control:
        DefaultPkgMgr= ( rpm )
        AddInstallable= ( haverpm_nedit needrpm_nedit )
        actionsequence= ( packages shellcommands )

packages:
        nedit   vers=5.4                cmp=ge  define=haverpm_nedit    
elsedefine=needrpm_nedit

alerts:
        haverpm_nedit:
                "I have a perfectly good copy of nedit."

        needrpm_nedit:
                "Nedit was missing.  Hells bells!"

shellcommands:
        needrpm_nedit::
                "/bin/rpm -Uv \
  http://mykickstartserver/path/Mandrake/RPMS3/nedit-5.4-1.i386.rpm";



Obviously, if you extrapolate this across many packages (say, for version 
checking an entire installation) this will get tedious quickly.  At that 
point you might rather do something clever, such as use cfengine to generate 
YUM config files or to pass your classlist into a script that looks for 
classes beginning with needrpm_ and knows what to do about them.    (Be 
warned-- as another thread on this list is discussing, there are problems 
with passing large classlists in this manner.)

If you decide to go with the above approach you might want to look in the 
faq-o-matic (note to all-- where did the link to the FAQ-o-matic go?), I 
think I posted a snippet on how to generate a file similar to the above.

On Monday 19 July 2004 07:15, freak wrote:
> Hello!!
> 
> I would to test if a package is installed on different hosts and
> install this package when is not installed.
> 
> Anybody knows if it's possible to do this type of command with
> cfengine???
> 
> All my network run on Debian Sarge!!!
> 
> Thanks
> 
> Freak
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
> 

-- 

Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]