help-cfengine
[Top][All Lists]
Advanced

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

Re: Imports act weird...any good workarounds?


From: Paul Krizak
Subject: Re: Imports act weird...any good workarounds?
Date: Thu, 29 Apr 2004 14:11:18 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

oooooooo...not bad! Still slightly kludgy (since you have to gather up all of the classes that you need in that particular cf.* file) but definitely better than what I had before!

Thanks!

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, Tx  78741
MPD Linux Systems                   Phone: (512) 602-5860
address@hidden



Ed Brown wrote:

Try:

control:
        AddInstallables = ( tx ca )


-Ed


On Thu, 2004-04-29 at 12:38, Paul Krizak wrote:
I'm working on deploying cfengine for our cluster of around 2800 hosts. One of the problems I've run in to is that the "import:" directive doesn't function as expected. According to the documentation, imports are processed *after* the main script runs (as oppsed to before, like pretty much all other languages). I've got a file, cf.classes, that contains information about the global classes (and some global variables) that I'd like to be able to use in other cf.* files. When I use the import: directive in one of these files, for example:

import:
 any::
   cf.classes

editfiles:
 tx::
    do some TX stuff

 ca::
    do some CA stuff

the "tx" and "ca" classes are defined in the cf.classes file, but have no effect in this file. Is there any way to force cfagent to apply the settings in import: directives *before* it runs the rest of the script?

The only workaround I can think of is "running" cf.classes, and defining some environment variable so that cf.classes sets up the global stuff, then *it* imports the cf.* file that I want to run. This solution is kludgy, though; I'd rather have the cf.* files be more script-ish and use the import: directive as expected.






reply via email to

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