Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,22838,22859#msg-22859
Thanks for the tip, Ben! This is nice, since it saves the additional canonify()
step.
___
Help-cfengine m
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: bbomgardner
Link to topic: https://cfengine.com/forum/read.php?3,22838,22858#msg-22858
A quick test shows that that cfengine will actually canonify the string
automatically in this case. This is news to me, as I thought that it would
Aleksey is correct here - a string, which may contain variables to be expanded,
is interpreted as a class, and the promise is evaluated if the resulting
classname is true.
So if the variable "foo" contains the 3 letters "baz", then ifvarclass =>
"foo$(foo)" will allow the promise to be execut
Thanks for the correction, Seva, I certainly don't want to produce
a misunderstanding.
Reference manual states:
Cfengine 3 has a new class predicate ifvarclass
which is ANDed with the normal class expression,
and which is evaluated together with the promise.
It may contain variabl
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: jordy
Link to topic: https://cfengine.com/forum/read.php?3,22838,22855#msg-22855
That is the solution!... thank you so much Diego!!
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
Better yet, you can drop the file argument.
# cf-runagent -H node1.cfengine.com -ivo "--no-lock -vf
/tmp/templates/copy_local_file_via_cf_runagent.cf.test"
Regards,
j
-Original Message-
From: Jerome Yanga
Sent: Tuesday, July 19, 2011 10:28 AM
To: 'Seva Gluschenko'
Cc: 'help-cfengine@cf
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,22838,22852#msg-22852
You need to use canonify, and then use the variable in a class expression.
Canonify ensures that the string only has characters that are valid in clas
Aleksey,
your statement sounds very new to me. IMHO, it may produce severe
misunderstanding.
The "ifvarclass" attribute does NOT allows one to treat a variable as
a class, it only allows to check whether different classes were
defined using a variable.
2011/7/19 Aleksey Tsalolikhin :
> Hi, jordy
Forum: CFEngine Help
Subject: Re: How to skip complete "bundle agent" execution depending of a class?
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,22837,22850#msg-22850
I really like using "methods:". It's really useful for breaking up complex
policies into logical and mo
Hi, jordy. Also check out "ifvarclass" promise attribute -- it's for
using variables as classes.
It's recommended to use it with the canonify function.
Best,
-at
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/list
Woohoo!!!
Of all places to find the answer for this, I found it on the man pages. :)
For anyone trying to get this to work, I did not change the cf file in this
trail. I just had to change the way I ran cf-runagent.
For completeness, here is the cf-serverd command I used.
# cf-serverd -Kvf /
Forum: CFEngine Help
Subject: Re: How to skip complete "bundle agent" execution depending of a class?
Author: jordy
Link to topic: https://cfengine.com/forum/read.php?3,22837,22848#msg-22848
Thank you Neil and Diego!
I like the Diego's solution. It's really flexible!!
___
Forum: CFEngine Help
Subject: Re: How to skip complete "bundle agent" execution depending of a class?
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,22837,22847#msg-22847
You could invoke them from another bundle using methods:, and control execution
using classes at that l
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: Seva Gluschenko
Link to topic: https://cfengine.com/forum/read.php?3,22838,22846#msg-22846
No, I can't show you an example. Looking thoroughly into the reference manual,
I've figured out that classify() won't really help, so that you
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: jordy
Link to topic: https://cfengine.com/forum/read.php?3,22838,22844#msg-22844
Thank you Seva... could you show us an example? I don't understand how to
create a variable name class (I know how to create a fixed name class, but not
Developers attend this maillist on more or less regular basis, but I
can't guarantee their attention was gained by this thread.
The source code for the community edition is available here:
http://cfengine.com/pages/source_code
You can download it and read (and even adjust for your needs).
2011/
Thank you, Seva.
Are there any links that you can provide for cf-runagent and cf-serverd?
Do developers see these messages? Or is there another thread that I should
forward this to?
Regards,
j
-Original Message-
From: Seva Gluschenko [mailto:seva.glusche...@gmail.com]
Sent: Monday, Ju
Forum: CFEngine Help
Subject: Re: Variable Class Names
Author: Seva Gluschenko
Link to topic: https://cfengine.com/forum/read.php?3,22838,22842#msg-22842
Use classify function
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.or
Forum: CFEngine Help
Subject: Re: How to skip complete "bundle agent" execution depending of a class?
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,22837,22841#msg-22841
Perhaps abortclasses.
http://cfengine.com/manuals/cf3-reference.html#abortclasses-in-agent
_
Forum: CFEngine Help
Subject: Re: edit global list
Author: schattenfell
Link to topic: https://cfengine.com/forum/read.php?3,22770,22840#msg-22840
One way is to have each individual bundle add its own lines into the module
file. Perhaps they directly add lines to a single file, or perhaps they ea
This might help... I execute a command and wrap it up with the canonify
function.
vars:
"linux_machine_model" string =>
canonify(execresult("/usr/sbin/dmidecode -s system-product-name","noshell"));
Canonify is a function that will “sanitize” the input to make i
Forum: CFEngine Help
Subject: Variable Class Names
Author: jordy
Link to topic: https://cfengine.com/forum/read.php?3,22838,22838#msg-22838
Hi!!
I think this question can be a newbie question, but I've searched for answers
and I can't find any.
I have a variable that can have different strings
Forum: CFEngine Help
Subject: How to skip complete "bundle agent" execution depending of a class?
Author: jordy
Link to topic: https://cfengine.com/forum/read.php?3,22837,22837#msg-22837
Hi!
We have 6 kind of different servers and I'm developing a complex set of
promises for them. Some promises
Forum: CFEngine Help
Subject: Hello, does any one one out there have any old Bedford CF mark 1
spares for a petrol engine?
Author: angle kate
Link to topic: https://cfengine.com/forum/read.php?3,22836,22836#msg-22836
i am looking for spares for a Bedford CF mark 1 petrol engine for a motor home
Forum: CFEngine Help
Subject: Re: Installing CFEngine on windows
Author: Frost
Link to topic: https://cfengine.com/forum/read.php?3,22811,22835#msg-22835
For some reason it works now, very odd haven't done anything in particular.
I just tried to reinstall the whole thing again to test if it still
Forum: CFEngine Help
Subject: Re: Installing CFEngine on windows
Author: Frost
Link to topic: https://cfengine.com/forum/read.php?3,22811,22834#msg-22834
It seems to compile just fine.
Yes i followed you guide, am i missing any packages or something?
Forum: CFEngine Help
Subject: Re: Class locality clarification
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,22827,22833#msg-22833
Thanks for clarification Mark. I agree that the documentation needs some
adjustments regarding this. I didn't understand 'classes' attribute fr
27 matches
Mail list logo