help-cfengine
[Top][All Lists]
Advanced

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

Re: Order of Execution


From: Brendan Strejcek
Subject: Re: Order of Execution
Date: Wed, 5 Jan 2005 11:18:13 -0600
User-agent: Mutt/1.5.6+20040818i

Pau Capdevila/Upcnet wrote:

> Is it possible to redefine the action sequence in an imported script?

Yes, but I don't understand how it works well enough to explain it in
a general manner. However, I can give you an example that works for me.

cfagent.conf:

    control:
        actionsequence = ( editfiles shellcommands )
    import:
        some_imported_fragment

some_imported_fragment:

    control:
        actionsequence = (
            copy.some_cf_fragment
            editfiles.some_cf_fragment
            links.some_cf_fragment
            shellcommands.some_cf_fragment
        )
    
    copy:
        some_cf_fragment::
    
    etc...

As I understand it, cfagent parses all the cfengine input files into one
big set of instructions with a single actionsequence. (This is also why
a single parse error in any included fragment causes the entire cfagent
run to bomb out.) So, the above example would lead to an aggregate
actionsequence that functions like:

    actionsequence = (
        editfiles
        shellcommands
        copy.some_cf_fragment
        editfiles.some_cf_fragment
        links.some_cf_fragment  
        shellcommands.some_cf_fragment
    )

Where my (presumed) understanding fails is where you don't qualify all
actionsequence entries in imports with classes. For example, I could not
tell you how the following configuration would behave:

cfagent.conf:

    control:
        actionsequence = ( editfiles shellcommands )
    import:
        some_imported_fragment

some_imported_fragment:

    control:
        actionsequence = ( shellcommands editfiles )

Is the final actionsequence ( editfiles shellcommands ) or is it
( shellcommands editfiles ) ?

-- Brendan




reply via email to

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