Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-30 Thread no-reply
Forum: Cfengine Help Subject: Re: conditional import of inputs -- i.e. using classes to control inputs Author: charming88 Link to topic: https://cfengine.com/forum/read.php?3,22083,22296#msg-22296 How can we believe what gold timberland boots you say? After all, is there a possibility that

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-24 Thread Daniel Dehennin
Daniel Dehennin writes: > Could this be considered a regression on bug 135[1] or is there a better > way to do it? Sorry, my fault, I forgot that classes in "bundle agent" are not globals. Here is my new results: #v+ bin/cf-agent -K -I R: Bundle agent test evaluated R: Bundle agent test2 evalu

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-23 Thread Daniel Dehennin
Daniel Dehennin writes: > Daniel Dehennin writes: > >> Aleksey Tsalolikhin writes: >> >>> I moved the classes promise higher, before the vars promise, >>> (which is how it is evaluated anyway), but I get: >>> >>> Can't stat file "./@(g.country)" for parsing >> >> I remember something about this

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-22 Thread Daniel Dehennin
Daniel Dehennin writes: > Aleksey Tsalolikhin writes: > >> I moved the classes promise higher, before the vars promise, >> (which is how it is evaluated anyway), but I get: >> >> Can't stat file "./@(g.country)" for parsing > > I remember something about this, a bug report[1] after a thread on t

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-20 Thread Aleksey Tsalolikhin
Dear Bas, Thanks a million!! I was able to use your workaround. body common control { inputs => { @(global.global_policy), "$(global.country_name)/$(global.country_name).cf", # "$(global.country_name)/change_management.cf", # "$(global.country_name)/quarter

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-20 Thread Bas van der Vlies
On 20-05-11 09:27, Seva Gluschenko wrote: > Aleksey, > > I did my experiments with Cfengine almost an year ago, so I might be > missing something. Perhaps, you can achieve your goals like follows: > > bundle common g > { > classes: > "italy" expression => classmatch("mil.*"); > } > > body c

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-20 Thread Seva Gluschenko
Aleksey, I did my experiments with Cfengine almost an year ago, so I might be missing something. Perhaps, you can achieve your goals like follows: bundle common g { classes: "italy" expression => classmatch("mil.*"); } body common control { italy:: inputs => { "italy.cf", "common.cf" }

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-19 Thread Daniel Dehennin
Aleksey Tsalolikhin writes: > I moved the classes promise higher, before the vars promise, > (which is how it is evaluated anyway), but I get: > > Can't stat file "./@(g.country)" for parsing I remember something about this, a bug report[1] after a thread on the mailing-list[2]. Regards. Footn

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-19 Thread Aleksey Tsalolikhin
I moved the classes promise higher, before the vars promise, (which is how it is evaluated anyway), but I get: Can't stat file "./@(g.country)" for parsing ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/he

Re: Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-19 Thread Aleksey Tsalolikhin
Hi, Seva. Did you try this? I tried what you suggested and cf-agent tried to read the file called @(g.countryside). Can you get it to work? Here is what I have now: # import italy.cf and run the italy bundlesequence # only if the hostname matches the pattern mil.* bundle common define_global

Cfengine Help: Re: conditional import of inputs -- i.e. using classes to control inputs

2011-05-19 Thread no-reply
Forum: Cfengine Help Subject: Re: conditional import of inputs -- i.e. using classes to control inputs Author: Seva Gluschenko Link to topic: https://cfengine.com/forum/read.php?3,22083,22084#msg-22084 Alexey, the body container parser doesn't allow for classes definition, so you cannot

conditional import of inputs -- i.e. using classes to control inputs

2011-05-19 Thread Aleksey Tsalolikhin
I'm trying to set up Cfengine to import (inputs attribute of the common control promise) a country-specific inputs file, and to call a country-specific bundle of promises, if the current instance of Cfengine belongs to the class of that country. The country class is definited based on the hostname