[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Imports act weird...any good workarounds?
From: |
Ed Brown |
Subject: |
Re: Imports act weird...any good workarounds? |
Date: |
Thu, 29 Apr 2004 13:03:45 -0600 |
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.