CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,23180,23211#msg-23211 Hi davidlee, I dare to say that your example with ifvarclass class: "runtime_condition" and => { ...foo ; bar ... }; vars: v string => "

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,23180,23206#msg-23206 Many thanks for looking at this. BTW, whenever I send requests like this, I try to do so from two different viewpoints: (1) as a user: m

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: mark Link to topic: https://cfengine.com/forum/read.php?3,23180,23205#msg-23205 These solutions should certainly work. I can't specifically recall any bugs relating to this, but we cover a lot of ground in a few releases.

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23180,23204#msg-23204 I see what you mean Diego. I'd like one of the CF developers to chime in and tell us what the expected behaviour is. It seems reason

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,23180,23203#msg-23203 Neil, you are correct with respect to the order of execution. However, why does my example work correctly (at least in 3.2.0)? I'm trying

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,23180,23202#msg-23202 David, the only explanation that occurs to me is that I tried this with cfengine 3.2.0b3, so maybe the behavior has changed a little bit.

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23180,23200#msg-23200 Vars promises are before classes. I would expect that the variable would not be defined until the second run. However, the report is

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,23180,23198#msg-23198 Thanks, Neil. Actually I think Diego's (zzamboni's) original "reports" was correct, but the use of ":" is overloaded at first sight. Hi

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,23180,23197#msg-23197 Your reports section looks like this. reports: cfengine_3:: "foo: $(foo)"; "conditional: $(conditional)"; I think it should look li

Re: CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread Bas van der Vlies
On 24-08-11 11:47, no-re...@cfengine.com wrote: > body common control > { >bundlesequence => { "test" }; > } > > bundle agent test > { > classes: >"runtime_condition" expression => fileexists("/tmp/foo"); > > vars: >"foo" string => "bar"; >runtime_condition:: > "conditional"

CFEngine Help: Re: conditional setting of a variable

2011-08-24 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,23180,23193#msg-23193 Thanks, Diego, particularly for the worked example. It so happens that I had actually tried that approach, but it didn't seem to work.

CFEngine Help: Re: conditional setting of a variable

2011-08-23 Thread no-reply
Forum: CFEngine Help Subject: Re: conditional setting of a variable Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,23180,23182#msg-23182 David, ifvarclass indeed does not work inside the vars: section (I agree this would be nice), but you can use the traditional class-expr