help-cfengine
[Top][All Lists]
Advanced

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

Re: importing files


From: Tim Nelson
Subject: Re: importing files
Date: Wed, 16 Mar 2005 15:53:09 +1100 (EST)

On Tue, 15 Mar 2005, Dustin Sorge wrote:

In the replies I have recieved I am noticing that everyone has a main.cf. It a main.cf required or is it just a matter of convenience? Is it possible to get away with just importing groups.cf

import:
  any::
     groups.cf

thanks everyone for the helpful suggestions, they have been great

I've only been skimming, and I thought that someone had already explained, but in double-checking, they haven't.

http://www.iu.hio.no/cfengine/docs/cfengine-Reference.html#import

        The relevant section is:
---------------------------------------------------
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.
---------------------------------------------------

        Hopefully that answers your question; if not, please write back.

        :)

--
Tim Nelson
Server Administrator
WebAlive Technologies Global
Level 1 Innovation Building, Digital Harbour
1010 LaTrobe Street
Docklands, Melbourne, Vic, 3008
Phone: +61 3 9934 0812
Fax: +61 3 9934 0899
E-mail: tim.nelson@webalive.biz
http://www.webalive.biz/

"Your Business, Your Web, Your Control"




reply via email to

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