Re: CFEngine Help: how to convert vars to a class

2011-09-15 Thread Nicolas Charles
;>>>> { >>>>>> vars: >>>>>> >>>>>>"temp" string => readfile( "/tmp/test.txt" ); >>>>>> } >>>>>> >>>>>> bundle agent animal >>

Re: CFEngine Help: how to convert vars to a class

2011-09-15 Thread Aleksey Tsalolikhin
1 at 11:36 AM, Jerome Yanga wrote: >>>>> Aleksey, >>>>> >>>>> I came up with the following but I seem to be misinterpreting the >>>>> reference manual.  I have also used canonify to no avail.  Help. >>>>> >>>>&

Re: CFEngine Help: how to convert vars to a class

2011-09-15 Thread Nicolas Charles
, Jerome Yanga wrote: >>>> Aleksey, >>>> >>>> I came up with the following but I seem to be misinterpreting the >>>> reference manual. I have also used canonify to no avail. Help. >>>> >>>> $ cat /tmp/test.txt >>>> DOG >>>&g

RE: CFEngine Help: how to convert vars to a class

2011-09-14 Thread Jerome Yanga
Indeed. Thank you much. Regards, j -Original Message- From: Aleksey Tsalolikhin [mailto:atsaloli.t...@gmail.com] Sent: Wednesday, September 14, 2011 11:12 AM To: Jerome Yanga Cc: help-cfengine@cfengine.org Subject: Re: CFEngine Help: how to convert vars to a class On Tue, Sep 13, 2011

Re: CFEngine Help: how to convert vars to a class

2011-09-14 Thread Aleksey Tsalolikhin
On Tue, Sep 13, 2011 at 4:07 PM, Jerome Yanga wrote: > Aleksey, > > Good eye.  I did put that second parameter on my actual promise.  I just > missed putting it in my example. That happens. :) > Yours worked as well.  How is yours different from that of Seva? I gave you a complete working ex

Re: CFEngine Help: how to convert vars to a class

2011-09-14 Thread Aleksey Tsalolikhin
ot;temp"  string  =>      readfile( "/tmp/test.txt" ); >>> } >>> >>> bundle agent animal >>> { >>>        commands: >>>                "/bin/echo $(g.temp)" >>>                        ifvarclass            

Re: CFEngine Help: how to convert vars to a class

2011-09-14 Thread Seva Gluschenko
>> bundle agent animal >> { >>        commands: >>                "/bin/echo $(g.temp)" >>                        ifvarclass              =>      "$(g.temp)"; >>        reports: >>                DOG:: >>                        &

RE: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Jerome Yanga
-Original Message- From: Aleksey Tsalolikhin [mailto:atsaloli.t...@gmail.com] Sent: Tuesday, September 13, 2011 2:24 PM To: Jerome Yanga Cc: help-cfengine@cfengine.org Subject: Re: CFEngine Help: how to convert vars to a class Hi, Jerome. I suggest using cf-promises to check the syntax on

RE: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Jerome Yanga
Thank you, Seva. This worked. Regards, j -Original Message- From: Seva Gluschenko [mailto:seva.glusche...@gmail.com] Sent: Tuesday, September 13, 2011 11:49 AM To: Jerome Yanga Cc: help-cfengine@cfengine.org Subject: Re: CFEngine Help: how to convert vars to a class Jerome, I guess

Re: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Aleksey Tsalolikhin
gt; > Yes, you can do it using the ifvarclass, which converts a variable to > a class.  Could you please read the ifvarclass section of the > reference manual, and let me know if you have any questions. > > Best, > Aleksey > > > On Tue, Sep 13, 2011 at 11:13 AM, Jerome Yanga

Re: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Seva Gluschenko
.  Could you please read the ifvarclass section of the > reference manual, and let me know if you have any questions. > > Best, > Aleksey > > > On Tue, Sep 13, 2011 at 11:13 AM, Jerome Yanga wrote: >> Is it possible to do what I am attempting to? >> >> Regards, &

RE: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Jerome Yanga
essage- From: Aleksey Tsalolikhin [mailto:atsaloli.t...@gmail.com] Sent: Tuesday, September 13, 2011 11:20 AM To: Jerome Yanga Cc: help-cfengine@cfengine.org Subject: Re: CFEngine Help: how to convert vars to a class Yes, you can do it using the ifvarclass, which converts a variable to a class. Could

Re: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Aleksey Tsalolikhin
am attempting to? > > Regards, > j > > -Original Message- > From: Jerome Yanga > Sent: Monday, September 12, 2011 4:27 PM > To: 'Aleksey Tsalolikhin' > Cc: 'help-cfengine@cfengine.org' > Subject: RE: CFEngine Help: how to convert vars to a cl

RE: CFEngine Help: how to convert vars to a class

2011-09-13 Thread Jerome Yanga
Is it possible to do what I am attempting to? Regards, j -Original Message- From: Jerome Yanga Sent: Monday, September 12, 2011 4:27 PM To: 'Aleksey Tsalolikhin' Cc: 'help-cfengine@cfengine.org' Subject: RE: CFEngine Help: how to convert vars to a class Aleksey

RE: CFEngine Help: how to convert vars to a class

2011-09-12 Thread Jerome Yanga
--Original Message- From: Aleksey Tsalolikhin [mailto:atsaloli.t...@gmail.com] Sent: Monday, September 12, 2011 4:15 PM To: Jerome Yanga Cc: help-cfengine@cfengine.org Subject: Re: CFEngine Help: how to convert vars to a class On Mon, Sep 12, 2011 at 3:58 PM, Jerome Yanga wrote: > I saw an

Re: CFEngine Help: how to convert vars to a class

2011-09-12 Thread Aleksey Tsalolikhin
On Mon, Sep 12, 2011 at 3:58 PM, Jerome Yanga wrote: > I saw another post on how to do this but it does not seem to work for me.   > Please correct my syntax How's this? [cfengine00 ~]# cat /tmp/test.txt DOG [cfengine00 ~]# cat test.cf body common control { bundlesequence => { "animal"