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

Re: defining classes

2010-05-05 Thread Sandra Wittenbrock
Thanks for all the helpful suggestions! Sandra Nakarin Phooripoom wrote: Also we can use function classify() to transform the fq hostname to canonical form. :-) "policy_hosts" expression => classify("cfengine.domain.com"), handle => "global_classes"; "policy_hosts

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
Also we can use function classify() to transform the fq hostname to canonical form. :-) "policy_hosts" expression => classify("cfengine.domain.com"), handle => "global_classes"; "policy_hosts" or => {classify("cfengine.domain.com")}, handle => "global_clas

Re: defining classes

2010-05-05 Thread Sandra Wittenbrock
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 my eye is your definition of the policy_hosts class. In your class list, you have a fully-qualified hostname with dots but Cfengine "c

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
Sandra, The one thing that initially catches my eye is your definition of the policy_hosts class. In your class list, you have a fully-qualified hostname with dots but Cfengine "canonifies" all classes, turning dots and other non-alphanumeric characters (dashes, etc.) into underscores. So try this

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
Thanks for posting these discoveries you are making - I'm just starting to work with cfengine and this stuff is very useful to know. From: help-cfengine-boun...@cfengine.org [help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd [jll...@digitalgl

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

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

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. > >