help-cfengine
[Top][All Lists]
Advanced

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

Re: Strategy for "one-off" tasks


From: skaar
Subject: Re: Strategy for "one-off" tasks
Date: Thu, 10 Jul 2003 13:53:01 -0400
User-agent: Mutt/1.4i

one of the real benefits with cfengine is the methodology requires. You
are required to implement changes, rather than just executing them. It
leaves a trace of your work and what is actually done. So even if you
have a single script that need to be run once it makes sense to use
your cfengine configuration for this. If you still want to do this
at a specific time or with ssh, you do something like this:

import:
  remote_manual::
    cf.tasks

cf.tasks

copy:
  /some/masterfile1
    dest=/path/to/script1
    server=$(policyhost)
    type=checksum

  /some/masterfile2
    dest=/path/to/script1
    server=$(policyhost)
    type=checksum

shellcommands::
  Yr2003.July.Day10.Hr13.remote_manual::
    "/path/to/script1" ...

  Yr2003.July.Day10.Hr10.remote_manual::
    "/path/to/script2" ...

  Yr2003.June.Day15.Hr16.remote_manual::
    "/path/to/script1" ...

Mark might tell you to use cfservd on each host and run cfrun, but that
might not work for you, and you'll do this with ssh and call cfagent
(maybe with sudo from a non-privileged user on the remote side).

ssh -t remotehost "/usr/sbin/cfagent -Dremote_manual -K -q -v"

/skaar


* Nielsen, Steve (SNielsen@comscore.com) [030710 13:33]:
> Steve
> 
> I don't use cfengine for one off tasks. Although I would be interested in
> hearing ideas on how others do it. Instead, to handle one offs, I wrote a
> wrapper around ssh (called sshauto) to loop over a set of machines and
> execute a command on each machine. I specify regexes for machines names and
> it queries DNS or hosts file. Its fairly clunky way of doing it but it
> works.
> 
> Steve
> 
> -----Original Message-----
> From: Ferguson, Steve [mailto:Steve.Ferguson@gedas.com]
> Sent: Thursday, July 10, 2003 11:08 AM
> To: help-cfengine@gnu.org
> Subject: Strategy for "one-off" tasks
> 
> 
> I'm interested in hearing how people are applying cfengine to perform "one
> off" system management tasks.  It's fairly obvious how one would insert a
> new configuration task in on a recurring basis.  But how would you approach
> a task that you only want to execute one time?  I've got a few different
> ideas in mind, but I'd like to hear what other folks have been doing in
> practice before I commit to any one process.
> 
> Steve
> 
> ---------------------------------------------------------------------------
> Steve Ferguson
> gedas USA, Inc.
> Operational Services & Infrastructure
> 3499 Hamlin Road West
> Rochester Hills, MI 48309-3240
> USA
> phone +1-248-754-3844
> fax   +1-248-754-3263
> Web Admin Pager: 1-877-622-8869
> Steve.Ferguson@gedas.com
> http://www.gedasusa.com
> ---------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 
/skaar

+-------------------------------------------------------------------+
+----- skaar@aol.net                   kent skaar   ----------------+
+----- internet services: infrastructure security   ----------------+
+-------------------------------------------------------------------+




reply via email to

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