CFEngine Help: Re: Read files once instead of a bunch?

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Read files once instead of a bunch? Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,26052,26053#msg-26053 Isn't your class expression backwards? I think it should be like this (untested): !g_counted_lines:: "line_count"int => countlin

CFEngine Help: Read files once instead of a bunch?

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Read files once instead of a bunch? Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,26052,26052#msg-26052 So, I have a vars promise in a global bundle (g) which looks like this: g_counted_lines:: "line_count"int => countlinesmatching( ".*",

CFEngine Help: Re: Running cf-execd on OSX

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Running cf-execd on OSX Author: mark Link to topic: https://cfengine.com/forum/read.php?3,26050,26051#msg-26051 Hi David, this is such a small thing that I think we should be able to do it quickly. Sometimes small issues get lost for larger ones. I'll see if we

CFEngine Help: Running cf-execd on OSX

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Running cf-execd on OSX Author: dpullman Link to topic: https://cfengine.com/forum/read.php?3,26050,26050#msg-26050 We've run cfengine 2 for years on OSX, various versions. To get cfexecd to work with launchctl, we used cfexecd -g to keep it in the foreground. Launc

CFEngine Help: Re: Cfengine 3.3 wins!

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Cfengine 3.3 wins! Author: msvob...@linkedin.com Link to topic: https://cfengine.com/forum/read.php?3,25626,26049#msg-26049 I think it was the move from the Berkeley DB backend database to Tokyocabinet. $ /cfengine/trunk msvoboda-4-mn:trunk msvoboda$ find . | w

Re: CFEngine Help: Re: git promises

2012-05-23 Thread Nick Anderson
On 05/23/2012 01:23 PM, Ted Zlatanov wrote: > On Wed, 23 May 2012 20:21:06 +0200 (CEST) sauer wrote: > > n> It's not git, but with subversion I just use a command promise (which > n> runs "svn update") in combination with a regular CFEngine file copy to > n> get the top-level directory's .svn di

Re: CFEngine Help: Re: git promises

2012-05-23 Thread Ted Zlatanov
On Wed, 23 May 2012 20:21:06 +0200 (CEST) sauer wrote: n> It's not git, but with subversion I just use a command promise (which n> runs "svn update") in combination with a regular CFEngine file copy to n> get the top-level directory's .svn directory in place. Could you share the exact commands y

CFEngine Help: Re: git promises

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: git promises Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,25954,26046#msg-26046 analogue Wrote: --- > Hi, > > I'm looking for some bundle that would allow me to > write promises for some gi

CFEngine Help: Re: Cfengine 3.3 wins!

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Cfengine 3.3 wins! Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,25626,26045#msg-26045 msvob...@linkedin.com Wrote: --- > I'm seeing some major increases in performance in > upgrading from Cf

CFEngine Help: Re: Replace underscores in interface names (creating routes)

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Replace underscores in interface names (creating routes) Author: alan.hatch Link to topic: https://cfengine.com/forum/read.php?3,26010,26044#msg-26044 That works for me. I'll also file a bug report based on your recommendation. Thank you. __

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,26033,26043#msg-26043 Dave, you are correct in both counts. Should be value() and if_elapsed(). Will get them fixed ASAP. __

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,26033,26042#msg-26042 Diego, Mark The Document at the URL cfengine.com You provided makes reference to the function "With()", but that does not seem to

Re: CFEngine Help: Proper way to manage large unique files

2012-05-23 Thread Mark Burgess
Yes, I would not recommend Augeas, edit_lines is the thing. On 05/23/2012 04:52 PM, Nick Anderson wrote: > On 05/23/2012 09:44 AM, Ted Zlatanov wrote: >> You may want to copy to an intermediate file (1) and use Augeas or >> edit_line on a second copy (2) which then gets copied into the final >> d

Re: CFEngine Help: Proper way to manage large unique files

2012-05-23 Thread Ted Zlatanov
On Wed, 23 May 2012 09:52:13 -0500 Nick Anderson wrote: NA> On 05/23/2012 09:44 AM, Ted Zlatanov wrote: >> You may want to copy to an intermediate file (1) and use Augeas or >> edit_line on a second copy (2) which then gets copied into the final >> destination (3). That way the network copy is

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,26033,26038#msg-26038 Thanks Diego. That is exactly what I need. Mark, I meant the copy_from promise would conflict with the edit_line promise. They wo

Re: CFEngine Help: Proper way to manage large unique files

2012-05-23 Thread Nick Anderson
On 05/23/2012 09:44 AM, Ted Zlatanov wrote: > You may want to copy to an intermediate file (1) and use Augeas or > edit_line on a second copy (2) which then gets copied into the final > destination (3). That way the network copy is done only when necessary > into (1), while Augeas/edit_line runs l

Re: CFEngine Help: Proper way to manage large unique files

2012-05-23 Thread Ted Zlatanov
On Wed, 23 May 2012 16:25:05 +0200 (CEST) daveseff wrote: n> I am distributing a large XML config file to a group of servers for an n> application. some parameters in the file need to be unique to the n> machine it's on. Because of it's size I would normally use a copy_from n> promise from a mast

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,26033,26036#msg-26036 (sorry, reposting under my own account) Dave, what you could do in this case is to split the operation into two steps: 1. Copy the

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: CFEngine Link to topic: https://cfengine.com/forum/read.php?3,26033,26035#msg-26035 Dave, what you could do in this case is to split the operation into two steps: 1. Copy the template file onto a local staging file

CFEngine Help: Re: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Re: Proper way to manage large unique files Author: mark Link to topic: https://cfengine.com/forum/read.php?3,26033,26034#msg-26034 Hi, don't understand what you mean by "the first promise". How does editing conflict? Can you templatize it? _

CFEngine Help: Proper way to manage large unique files

2012-05-23 Thread no-reply
Forum: CFEngine Help Subject: Proper way to manage large unique files Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,26033,26033#msg-26033 I am distributing a large XML config file to a group of servers for an application. some parameters in the file need to be unique to th

Re: reports: showstate => { ... }

2012-05-23 Thread Mark Burgess
It is not going to be removed, we've used it here in the past, but not for a while. M On 05/23/2012 03:21 PM, Nick Anderson wrote: > On 05/23/2012 08:13 AM, Mikhail Gusarov wrote: >> Hi. >> >> Is there anyone who uses the "showstate" option of reports promise? It seems >> to >> be broken w.r.t

Re: reports: showstate => { ... }

2012-05-23 Thread Neil Watson
On 05/23/2012 08:13 AM, Mikhail Gusarov wrote: > Is there anyone who uses the "showstate" option of reports promise? It seems > to > be broken w.r.t. report_to_file option since the beginning, and noone noticed. I've use this on rare occasions in the past. -- Neil Watson Linux/UNIX Consultant

Re: reports: showstate => { ... }

2012-05-23 Thread Nick Anderson
On 05/23/2012 08:13 AM, Mikhail Gusarov wrote: > Hi. > > Is there anyone who uses the "showstate" option of reports promise? It seems > to > be broken w.r.t. report_to_file option since the beginning, and noone noticed. > I didn't know it existed. Are you considering removing it all together? If

reports: showstate => { ... }

2012-05-23 Thread Mikhail Gusarov
Hi. Is there anyone who uses the "showstate" option of reports promise? It seems to be broken w.r.t. report_to_file option since the beginning, and noone noticed. -- Mikhail Gusarov ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfe

Re: CFEngine Help: Re: CFEngine Help: git promises

2012-05-23 Thread Ted Zlatanov
On Tue, 22 May 2012 20:57:26 -0500 Nick Anderson wrote: NA> On 05/22/2012 08:41 PM, Nick Anderson wrote: >> https://cfengine.com/manuals/cf3-Reference#Function-getenv NA> So env contains USER, and with that we can get gid. NA> "user" string => getenv("USER","20"); NA> "no" int => get

Re: templates: regression in 3.3.x?

2012-05-23 Thread Marco Marongiu
On 23/05/2012 14:14, Marco Marongiu wrote: > I partially found the source for the "regression": I used > expand_template in previous versions. I'll check that Checked: If the file exists the way it was created by edit_template, it won't be changed unless you add "edit_defaults => empty". With "em

Re: templates: regression in 3.3.x?

2012-05-23 Thread Marco Marongiu
> Can you confirm this is a regression from pre-3.3 versions? I partially found the source for the "regression": I used expand_template in previous versions. I'll check that However, I keep the point for how templates should behave: duplicated lines in templates must *not* be suppressed. Just thi

templates: regression in 3.3.x?

2012-05-23 Thread Marco Marongiu
Hi all I have a simple template like the following: ---8<--8<--8<--8<--8<--8<--8<--8<--8<--- ### # # snmdp configuration for host $(sys.fqhost) # # This file is centrally managed by cfengine # Locatio

classes in packages promises

2012-05-23 Thread Marco Marongiu
Hi all I'd expect this promise to define the class snmpd_installed: - if the package was not installed, and it succeeds in installing it; - if the package is already installed. packages: "snmpd" comment=> "Install snmpd", package_policy => "addupdate", p

Re: CFEngine Help: Strange error message

2012-05-23 Thread Bas van der Vlies
On 05/21/2012 03:48 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Strange error message > Author: daveseff > Link to topic: https://cfengine.com/forum/read.php?3,25995,25995#msg-25995 > > Periodically I'm getting emails from random systems with the following > message. My con