Re: errors when defining classes based on built-in functions

2011-03-30 Thread M LZ
Thanks very much for your help! I'll find an workaround until a new stable version is released. Regards, mlz. On Wed, Mar 30, 2011 at 12:37 PM, Bas van der Vlies wrote: > On 30-03-11 11:01, M LZ wrote: > > I believe you, but on 3.1.4 both on sparc.solaris and debian_5.linux > doesn't. > > >

Re: errors when defining classes based on built-in functions

2011-03-30 Thread Bas van der Vlies
On 30-03-11 11:01, M LZ wrote: > I believe you, but on 3.1.4 both on sparc.solaris and debian_5.linux doesn't. > I just tested it to let you know it is fixed with a newer version. So wait till a new version is released and your problem is solved or try a svn version. > Regards, > mlz. > > > On W

Re: errors when defining classes based on built-in functions

2011-03-30 Thread M LZ
I believe you, but on 3.1.4 both on sparc.solaris and debian_5.linux doesn't. Regards, mlz. On Wed, Mar 30, 2011 at 11:57 AM, Bas van der Vlies wrote: > On 29-03-11 15:17, M LZ wrote: > > > > Hi, > > > > I encounter the following problem, extracted from a more complex config: > > > > bundle ag

Re: Cfengine Help: Re: errors when defining classes based on built-in functions

2011-03-30 Thread M LZ
: > Forum: Cfengine Help > Subject: Re: errors when defining classes based on built-in functions > Author: phnakarin > Link to topic: https://cfengine.com/forum/read.php?3,21286,21302#msg-21302 > > If you ask me, I'd consider it as a bug. Cfengine should populate test_var > t

Re: errors when defining classes based on built-in functions

2011-03-30 Thread Bas van der Vlies
On 29-03-11 15:17, M LZ wrote: > > Hi, > > I encounter the following problem, extracted from a more complex config: > > bundle agent test { > > classes: > > "test_class" expression => fileexists("/etc/passwd"); > > # "test_class" and => { fileexists("/etc/passwd") }; > > # "test_class" expressio

Cfengine Help: Re: errors when defining classes based on built-in functions

2011-03-29 Thread no-reply
Forum: Cfengine Help Subject: Re: errors when defining classes based on built-in functions Author: phnakarin Link to topic: https://cfengine.com/forum/read.php?3,21286,21302#msg-21302 If you ask me, I'd consider it as a bug. Cfengine should populate test_var the 2nd time it evaluate vars: s

Re: Cfengine Help: Re: errors when defining classes based on built-in functions

2011-03-29 Thread M LZ
, mlz. On Tue, Mar 29, 2011 at 4:52 PM, wrote: > Forum: Cfengine Help > Subject: Re: errors when defining classes based on built-in functions > Author: bbomgardner > Link to topic: https://cfengine.com/forum/read.php?3,21286,21287#msg-21287 > > This has to do with the static or

Cfengine Help: Re: errors when defining classes based on built-in functions

2011-03-29 Thread no-reply
Forum: Cfengine Help Subject: Re: errors when defining classes based on built-in functions Author: bbomgardner Link to topic: https://cfengine.com/forum/read.php?3,21286,21287#msg-21287 This has to do with the static order of agent operations. http://www.cfengine.org/manuals/cf3-reference.html

Re: errors when defining classes based on built-in functions

2011-03-29 Thread Frans Lawaetz
> Is it something that I miss or things are not working the way the > documentation says? > Were I to hazard a guess I'd say it has to do with cfengine's normal ordering. See section 2.8.1 in the manual. Specifically, "In general it is wise to avoid class-variable dependency as much as poss

errors when defining classes based on built-in functions

2011-03-29 Thread M LZ
Hi, I encounter the following problem, extracted from a more complex config: bundle agent test { classes: "test_class" expression => fileexists("/etc/passwd"); # "test_class" and => { fileexists("/etc/passwd") }; # "test_class" expression => "sunos_5_10"; vars: test_class::

Cfengine Help: Re: Defining classes based on running processes

2011-02-15 Thread no-reply
Forum: Cfengine Help Subject: Re: Defining classes based on running processes Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,20666,20682#msg-20682 I don't think that you need a module. You could use a process_select promise. http://www.cfengine.org/manual

Cfengine Help: Re: Defining classes based on running processes

2011-02-14 Thread no-reply
Forum: Cfengine Help Subject: Re: Defining classes based on running processes Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,20666,20669#msg-20669 So I RTFM, which I should have done already, It seems I can do this using modules I'll have to write the module, which

Cfengine Help: Defining classes based on running processes

2011-02-14 Thread no-reply
Forum: Cfengine Help Subject: Defining classes based on running processes Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,20666,20666#msg-20666 I have several hundred machines managed by CFengine. I would like to define a class based on certain running processes so that we

Re: Cfengine Help: cfagent and defining classes

2010-08-06 Thread Bas van der Vlies
On 06-08-10 17:13, no-re...@cfengine.com wrote: > Forum: Cfengine Help > Subject: cfagent and defining classes > Author: pupu > Link to topic: https://cfengine.com/forum/read.php?3,17858,17858#msg-17858 > > Hello, > > I'm new to cfengine and I've encountered

Cfengine Help: cfagent and defining classes

2010-08-06 Thread no-reply
Forum: Cfengine Help Subject: cfagent and defining classes Author: pupu Link to topic: https://cfengine.com/forum/read.php?3,17858,17858#msg-17858 Hello, I'm new to cfengine and I've encountered problem while running it on RedHat Linux 5. I'm trying to distinguish between two

Re: Problem defining classes from an slist

2010-05-17 Thread Daniel V Klein
gt; Sent: Monday, May 17, 2010 4:43 PM > To: Justin Lloyd > Cc: help-cfengine@cfengine.org > Subject: Re: Problem defining classes from an slist > > I am not sure what you're doing worng. The following bundle works just > fine > for me... I did "cf-agent -Kb f

RE: Problem defining classes from an slist

2010-05-17 Thread Justin Lloyd
engine.org] On Behalf Of Justin Lloyd Sent: Monday, May 17, 2010 5:29 PM To: Daniel V Klein Cc: help-cfengine@cfengine.org Subject: RE: Problem defining classes from an slist I just compared your bundle to mine and found the problem. I was doing this in a common bundle while yours is in an agent bund

RE: Problem defining classes from an slist

2010-05-17 Thread Justin Lloyd
n a common bundle for global access. Is this a technical limitation with how common bundles work? Justin -Original Message- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Monday, May 17, 2010 4:43 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Problem defining class

Re: Problem defining classes from an slist

2010-05-17 Thread Daniel V Klein
adm/$(logs)"); > > It gives the same error about illegal characters. > > Justin > > -----Original Message- > From: help-cfengine-boun...@cfengine.org > [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd > Sent: Monday, May 17, 2010 12:25

RE: Problem defining classes from an slist

2010-05-17 Thread Justin Lloyd
quot;/var/adm/$(logs)"); It gives the same error about illegal characters. Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Monday, May 17, 2010 12:25 PM To: help-cfengine@cfengine.org Subject: Pro

Problem defining classes from an slist

2010-05-17 Thread Justin Lloyd
I have an slist variable, named "logs", of logfile names and just ran into a problem when I added a filename with a hyphen in it, breaking this classes promise: "$(logs)_exists" expression => fileexists("/var/adm/$(logs)"); Running cf-promises on the .cf file returns the following message: !! Cl

Re: defining classes

2010-05-05 Thread Sandra Wittenbrock
ine.org] On Behalf Of Sandra Wittenbrock Sent: Wednesday, May 05, 2010 12:36 PM To: help-cfengine@cfengine.org Subject: defining classes Hello, I've been playing with cfengine for a while, copying configurations, and running them on my systems. Now I need to make then do what I need them to do.

RE: defining classes

2010-05-05 Thread Justin Lloyd
ov] Sent: Wednesday, May 05, 2010 1:24 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: defining classes Justin, Thanks for the swift response. And your suggestion worked! It was that easy. Sandra Justin Lloyd wrote: > Sandra, > > The one thing that initially catches

Re: defining classes

2010-05-05 Thread Sandra Wittenbrock
Thank you for the helpful suggestions. wrote: Hello Sandra, First of all, common bundles don't need to be included into the bundlesequence. Next, the whole policy_hosts construction looks dubious. What did it mean to be, compound match or single? The following would fit better:

Re: defining classes

2010-05-05 Thread Nakarin Phooripoom
d other non-alphanumeric characters (dashes, etc.) into underscores. >> So try this: >> "policy_hosts" => { "cfengine_domain_com" }, >>handle => "global_classes"; >> Justin >> -Original Message- >> From: help-cfengine-bo

Re: defining classes

2010-05-05 Thread Sandra Wittenbrock
- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Sandra Wittenbrock Sent: Wednesday, May 05, 2010 12:36 PM To: help-cfengine@cfengine.org Subject: defining classes Hello, I've been playing with cfengine for a while, copying configurations, and r

Re: defining classes

2010-05-05 Thread Сева Глущенко
Hello Sandra, First of all, common bundles don't need to be included into the bundlesequence. Next, the whole policy_hosts construction looks dubious. What did it mean to be, compound match or single? The following would fit better: classes: "policy_hosts" expression => "cfengine_domain_com

RE: defining classes

2010-05-05 Thread Justin Lloyd
ent: Wednesday, May 05, 2010 12:36 PM To: help-cfengine@cfengine.org Subject: defining classes Hello, I've been playing with cfengine for a while, copying configurations, and running them on my systems. Now I need to make then do what I need them to do. For this I need to define classes. I&#x

defining classes

2010-05-05 Thread Sandra Wittenbrock
Hello, I've been playing with cfengine for a while, copying configurations, and running them on my systems. Now I need to make then do what I need them to do. For this I need to define classes. I've been able to use hard classes to select when some bundles are run, however I've been unable to

Re: Defining classes using "dist"

2010-03-17 Thread Mark Burgess
sing this feature > and I wondered when you'd ever want it. Now I know, so thanks for such a > great feature! :) > > Thanks, > Justin > > -Original Message- > From: Mark Burgess [mailto:mark.burg...@iu.hio.no] > Sent: Wednesday, March 10, 2010 12:25 PM > T

RE: Defining classes using "dist"

2010-03-11 Thread Justin Lloyd
run during the same agent execution. Justin -Original Message- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Thursday, March 11, 2010 1:02 PM To: Justin Lloyd Cc: Mark Burgess; help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" This looks like a bug

Re: Defining classes using "dist"

2010-03-11 Thread Daniel V Klein
x27;t open a ticket, I already reported this. > > Justin Lloyd wrote: > > Which part, the re-evaluation of the dist class on each iteration or > the > > existence of multiple classes from the same base dist class? I'll open > a > > ticket based on your response

RE: Defining classes using "dist"

2010-03-11 Thread Justin Lloyd
feature! :) Thanks, Justin -Original Message- From: Mark Burgess [mailto:mark.burg...@iu.hio.no] Sent: Wednesday, March 10, 2010 12:25 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" I mean the reevaluation of dist classes. Don'

Re: Defining classes using "dist"

2010-03-10 Thread Mark Burgess
ed on your response. > > Thanks, > Justin > > -Original Message- > From: Mark Burgess [mailto:mark.burg...@iu.hio.no] > Sent: Wednesday, March 10, 2010 12:11 PM > To: Justin Lloyd > Cc: help-cfengine@cfengine.org > Subject: Re: Defining classes using "dist&qu

RE: Defining classes using "dist"

2010-03-10 Thread Justin Lloyd
March 10, 2010 12:11 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" This sounds like a bug. Justin Lloyd wrote: > This is just an FYI post, so feel free to ignore my rambling if you're > not interested in some slightly deeper m

Re: Defining classes using "dist"

2010-03-10 Thread Mark Burgess
This sounds like a bug. Justin Lloyd wrote: > This is just an FYI post, so feel free to ignore my rambling if you're > not interested in some slightly deeper mechanics. :) > > So, I've learned something this morning. As I recall from reading, > Cfengine iterates its agent ordering (vars, classes

RE: Defining classes using "dist"

2010-03-10 Thread Eric Black
[jll...@digitalglobe.com] Sent: Wednesday, March 10, 2010 1:46 PM To: help-cfengine@cfengine.org Subject: Defining classes using "dist" This is just an FYI post, so feel free to ignore my rambling if you're not interested in some slightly deeper mechanics. :) So, I've learned something

Defining classes using "dist"

2010-03-10 Thread Justin Lloyd
This is just an FYI post, so feel free to ignore my rambling if you're not interested in some slightly deeper mechanics. :) So, I've learned something this morning. As I recall from reading, Cfengine iterates its agent ordering (vars, classes, etc.) up to three times. A close examination of verbos

Re: Defining Classes

2010-02-24 Thread NWatson
> > bundle common g > { classes: # missing > "Live" or => { "server1", "server2"} ; > "Acceptance" or => { "server3", "server4"} ; > "TestAndDev" or => { "ugos563" } ; > "AllServers" or => Live.Acceptance.TestAndDev; # last is not or but expressi

Defining Classes

2010-02-24 Thread Mark Nelson
Hello I am tring to define some global classes, I have a series of machines that make up a system. I have defined a series of classes that make up each individual component of the system i.e. - Acceptance - Live - Test I am trying to define a class that contains all the classes above. My code

Re: Defining classes using array values

2010-02-03 Thread Mark Burgess
y > policy, which was the idea for having it in the first place. > > Unless I missing something else... > > Justin > > -Original Message- > From: nwat...@symcor.com [mailto:nwat...@symcor.com] > Sent: Wednesday, February 03, 2010 12:34 PM > To: Justin Lloyd > Cc: h

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
-Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 12:34 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: RE: Defining classes using array values Still wfm [r...@unxxhd01 inputs]# cf-age

RE: Defining classes using array values

2010-02-03 Thread NWatson
Still wfm [r...@unxxhd01 inputs]# cf-agent -If ./foo.cf Validation: Scalar item in built-in FnCall isvariable-arg => { config[RUNTIME] } in rvalue is out of bounds (value should match pattern [a-zA-Z0-9_$.]+) R: config[RUNTIME] is a variable with value CONFIG!! Validation: Scalar item in built-i

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
may be ok as an RHS value but not LHS. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 12:15 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: RE: Defining classes using array v

RE: Defining classes using array values

2010-02-03 Thread NWatson
You idea does seem to work. The error seems more like a warning. cf3 + Private classes augmented: cf3 + runtime_one cf3 cf3 - Private classes diminished: cf3 cf3 cf3 cf3= cf3reports in bundle neil (1) cf3

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
a bug. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 11:57 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Defining classes using array values I get a similar message but stil

Re: Defining classes using array values

2010-02-03 Thread NWatson
I get a similar message but still a report: [r...@unxxhd01 inputs]# cf-agent -f ./foo.cf Validation: Scalar item in built-in FnCall isvariable-arg => { foo[1] } in rvalue is out of bounds (value should match pattern [a-zA-Z0-9_$.]+) R: foo[1] is a variable with value one Validation: Scalar item i

Defining classes using array values

2010-02-03 Thread Justin Lloyd
I'm trying the following which doesn't work: vars: # parse /etc/digitalglobe.conf into the array $(config) "config_count" int => readstringarray("config", "/etc/digitalglobe.conf", "#[^\n]*", "=", 20, 2000); classes: # create a class named config_$RUNTIME

Re: Defining Classes in CF-Engine 3

2010-01-11 Thread Mark Nelson
Mark Burgess wrote: Hello Thank you for the very prompt response, would I reference them as "${xyz.ClassName}":: do something Regards Mark. Put the classes in bundle common xyz { } Mark Nelson wrote: Hello I'm not sure how to do this. I want to define

Re: Defining Classes in CF-Engine 3

2010-01-11 Thread Mark Burgess
No, just xyz:: do something Only classes defined in common classes are global. M Mark Nelson wrote: > Mark Burgess wrote: > > Hello > > Thank you for the very prompt response, would I reference them as > > "${xyz.ClassName}":: > do something > > > Regard

Re: Defining Classes in CF-Engine 3

2010-01-11 Thread Mark Burgess
Put the classes in bundle common xyz { } Mark Nelson wrote: > Hello > > I'm not sure how to do this. I want to define a series of classes at a > single point within the CF-engine configuration and then reference the > classes in various bundles within the CF-Engine configuration system. > >

Defining Classes in CF-Engine 3

2010-01-11 Thread Mark Nelson
Hello I'm not sure how to do this. I want to define a series of classes at a single point within the CF-engine configuration and then reference the classes in various bundles within the CF-Engine configuration system. e.g classes.cf classes: "MailServers"or =>