This still seems to apply for groups. Can we update the documentation?
[EMAIL PROTECTED]:~/.cfagent/inputs$ tail -100 cf.import cf.class
==> cf.import <==
control:
actionsequence = ( shellcommands )
variable2 = ( "value2" )
import:
cf.class
shellcommands:
any::
"/bin/echo cf.import ${variable}"
class_true::
"/bin/echo cf.import ${variable2}"
==> cf.class <==
groups:
class_true = ( any )
[EMAIL PROTECTED]:~/.cfagent/inputs$
CFINPUTS=/home/pearcec/.cfagent/inputs/ cfagent -f cf.import -KI
cfengine:: Executing script /bin/echo cf.import
${variable}...(timeout=0,uid=-1,gid=-1)
cfengine::/bin/echo cf.im: cf.import
cfengine:: Finished script /bin/echo cf.import ${variable}
On 9/29/05, christian pearce <[EMAIL PROTECTED]> wrote:
> From the reference guide:
>
> "Note that, if you define variables in an imported file they will not
> be defined for operations in their parent files. This because cfengine
> reads in all the import files after the main file has been parsed—not
> at the place where you call import in your script. This means that
> variables or macros defined in imported files are only defined after
> the main program. Variables from earlier files are inherited by later
> includes, but not vice-versa."
>
> The experiment:
>
> [EMAIL PROTECTED]:~/.cfagent/inputs$ tail cf.import cf.value ==>
> cf.import <==
>
> shellcommands:
>
> "/bin/echo cf.import ${variable}"
> "/bin/echo cf.import ${variable2}"
>
> import:
>
> cf.value
>
>
> ==> cf.value <==
> control:
>
> variable = ( "value" )
>
> shellcommands:
>
> "/bin/echo cf.value ${variable}"
> [EMAIL PROTECTED]:~/.cfagent/inputs$ CFINPUTS=~/.cfagent/inputs/
> cfagent -f ./cf.import -K
> cfengine::/bin/echo cf.im: cf.import value
> cfengine::/bin/echo cf.im: cf.import value value2
> cfengine::/bin/echo cf.va: cf.value value
>
>
> It appears that the macro are now expanded during the execution of an
> action? If so does any part of the documentation I quoted above
> apply? What am I am missing?
> --
> Christian Pearce
> Perfect Order, Inc.
>
--
Christian Pearce
Perfect Order, Inc.
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine