[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Order of Execution
From: |
Christian Pearce |
Subject: |
Re: Order of Execution |
Date: |
Wed, 05 Jan 2005 08:34:18 -0500 |
Maybe this will work. This isn't code complete.
cfagent.conf
control:
actionsequence = ( copy shellcommands shellcommands.secondrun )
import:
cf.solaris
cf.dns
cf.solaris
copy:
[Code to copy file to /tmp/a]
shellcomands:
secondrun::
echo "How are you today?" >> /tmp/a
cf.dns
shellcommmands:
any::
echo "Hello World" > /tmp/a
On Wed, 2005-01-05 at 07:44, Brian E. Seppanen wrote:
> I hope I'm not some mutant in my configuration. I'm managing about a
> 100 hosts with cfengine of various solaris and linux running
> cfengine-2.1.10.
>
> I have rules for ostype, services, etc... sometime the same file needs to
> be modified for both ostype and service and the order of execution becomes
> a factor in whether the action completes properly.
>
> So I have a solaris dns server.
>
> First I execute cf.dns then I execute cf.solaris
> both of the cf's refer to a single file
>
> cf.dns opens /tmp/a, and Inserts "Hello World"
> cf.solaris copies /tmp/a from masterhost, and inserts "How are you today?"
>
> What I need to end up with is a file that has
>
> ## This is my master File ##
> ## Copied from MasterHost ##
> Hello World
> How are you today?
>
> Are there any tricks to order of execution, can I delay an action and
> come back for another pass?
>
> Theoretically would it be better to have a general cf.solaris occur before
> a more specific cf.dns or vice versa? Just wondering about the pros and
> cons of each.
>
> Thanks for the help.
>
> Brian Seppanen
> seppy@chartermi.net
> 906-475-0107 ext 1040
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
--
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com
- Order of Execution, Brian E. Seppanen, 2005/01/05
- Re: Order of Execution,
Christian Pearce <=