help-cfengine
[Top][All Lists]
Advanced

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

Re: Puzzler: Can cfengine replace make?


From: Jon Stearley
Subject: Re: Puzzler: Can cfengine replace make?
Date: Tue, 6 Nov 2001 08:22:08 -0700
User-agent: Mutt/1.3.22i

> symlink will be set once, ntpdate will run, and then xntpd will be
> installed once, at first boot only, for the life of the machine.  Make
> sense?
> 
> But ntpdate will still run every time, at each subsequent boot.  Still
> make sense?
> 
> Now, here's the question:  Can anyone see a way to do this once-only
> type of action cleanly in cfengine?  I've tried several different ways
> over the years, but I've never been satisfied with the results.  

my approach has been to use the same mechanism - the existence (or
update) of certain files.  instead of "touch"ed files, i tend to pick
something critical to the package itself.  ie:

-------------- snippet from cf.webserver -------------------------
groups:
    install_apache = ( '/usr/bin/test ! -e /usr/sbin/apachectl' )

copy:
    # ps, in cfengine.conf i've got: DefaultCopyType = ( byte )
    $(webdir)/apache/ dest=/etc/apache/ recurse=inf define=apache_changed

shellcommands:
  install_apache::
    "/usr/bin/yes no | apt-get install libmm10 apache-common apache libapach 
e-mod-ssl libapache-mod-ssl-doc analog"
  apache_changed|php4_changed|jserv_changed::
    "/etc/init.d/apache restart"
    "/etc/init.d/jserv restart"
------------------------------------------------------------------

in this way, the needed packages are installed once, and restarted
when appropriate (ie- their configs change).  this and other examples
can be found in the stuff i wrapped up in february (not updated
since), at ftp://ftp.cs.unm.edu/pub/jstear/example_infrastructure.tar.gz

my 2c.

-- 
+--------------------------------------------------------------+
| Jon Stearley                  (505) 845-7571  (FAX 844-2067) |
| Compaq Federal LLC            High Performance Solutions     |
| Sandia National Laboratories  Scalable Systems Integration   |
+--------------------------------------------------------------+




reply via email to

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