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
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
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
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
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:
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
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
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
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
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
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
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
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'
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
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
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
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
>
> 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
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
-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
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
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
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
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
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
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
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
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.
>
>
28 matches
Mail list logo