Re: RFC: JSON support for CFEngine

2012-09-21 Thread Ted Zlatanov
On Fri, 21 Sep 2012 17:24:50 + Mike Svoboda wrote: MS> Ted, this is awesome and really should make it into the main trunk. MS> Having JSON support would rock. YAML would also rock. Both data formats MS> are used all over the place, and we would have a ton of use cases for this. MS> Please

Re: CFEngine Help: Re: RFC: JSON support for CFEngine

2012-09-21 Thread Ted Zlatanov
On Fri, 21 Sep 2012 18:29:52 +0200 (CEST) neilhwatson wrote: n> Still I'd like to see some more complex examples of what you had n> mind. The Design Center sketch parameters are good examples of the JSON data I'd like to handle, and you can see in all the test.cf files how the JSON parameters cu

RFC: JSON support for CFEngine

2012-09-21 Thread Ted Zlatanov
You can find some experimental support for JSON in my fork of the core CFEngine here: https://github.com/tzz/core/tree/feature/json This is rough undocumented code intended as a proof of concept, written in my spare time. It's not officially supported by CFEngine! It provides three things (the

Re: editing iptables under Linux.... tested on CentOS 5... can somebody give it a whirl, please?

2012-09-21 Thread Ted Zlatanov
On Thu, 13 Sep 2012 19:39:30 -0500 Diego Zamboni wrote: DZ> I think this might be a better fit for the Design Center than to the DZ> COPBL, given that it performs a specific, higher-level task (rather DZ> than a generic, lower-level task, which is what we try to keep in the DZ> stdlib). DZ> We

Re: CFEngine Help: Re: rpm_version package provider

2012-09-21 Thread Ted Zlatanov
On Tue, 18 Sep 2012 23:05:13 +0200 (CEST) neilhwatson wrote: n> I could kick whoever decided to use version numbers that are not n> numbers. This is a number 2.334. This is not a number 3.4.3. Please note 2.334 means a different number in many locales! This is *not* a simple problem! (relate

Re: CFEngine Help: Policy distribution

2012-09-13 Thread Ted Zlatanov
On Thu, 13 Sep 2012 14:43:47 -0500 Nick Anderson wrote: NA> On 09/13/2012 02:38 PM, Ted Zlatanov wrote: >> As Nick mentioned, VCS::vcs_mirror in Design Center addresses this. NA> There is a git_failsafe.cf or something similar in contrib that Ted has NA> been working on. I h

Re: CFEngine Help: Re: List element extraction fails

2012-09-13 Thread Ted Zlatanov
On Fri, 31 Aug 2012 20:00:22 +0200 (CEST) neilhwatson wrote: > AFAIK it is not possible to call out a single element in a list. I don't endorse it, but I've heard you can use a file with grep/head/tail to do this ;) Ted ___ Help-cfengine mailing list

Re: CFEngine Help: Policy distribution

2012-09-13 Thread Ted Zlatanov
On Sat, 1 Sep 2012 11:08:13 +0200 (CEST) mpr wrote: > Currently our policy is kept in git and distributed using > cf-serverd. Since we already have public/private key authentication > for git why not use git to distribute the files instead of cf-serverd > (running "git pull" from update.cf)? Any

Re: CFEngine Help: Re: passing lists to external body parts

2012-09-13 Thread Ted Zlatanov
On Mon, 10 Sep 2012 22:22:30 +0200 (CEST) sauer wrote: > as long as we're wishing for anonymous structures. :) Design Center (through cf-sketch) attempts to alleviate this problem by feeding a unique prefix to the sketch "entry point" bundle, and prefixing every variable with it. Thus you can c

Re: CFEngine Help: Re: Why it's necessary to restart defined service one time.

2012-09-13 Thread Ted Zlatanov
On Wed, 5 Sep 2012 20:28:49 +0200 (CEST) juriskrumins wrote: j> mikesphar Wrote: >> I believe that is a violation of the Linux >> Standard Base specifications. j> 100% agree. But it's obvious we're not in an ideal world. So violation/bugs happens. "In theory, theory and practice are the sam

Re: CFEngine Help: Darwin/OS X: cf-execd log entries

2012-09-13 Thread Ted Zlatanov
On Thu, 13 Sep 2012 09:23:18 +0200 (CEST) bernhard.gl...@ecologic.eu wrote: b> on my darwin systems I can't get rid of this annoying log entries each time cf-execd is calling the cf-agent: b> dnssd_clientstub write_all: SO_ISDEFUNCT failed 38 Socket operation on non-socket b> anybody an

Re: CFEngine Help: Re: CFEngine Help: Integer splayclass equivalent

2012-08-13 Thread Ted Zlatanov
On Sun, 12 Aug 2012 22:37:41 +0200 (CEST) sauer wrote: n> Ted Zlatanov Wrote: n> --- >> On Tue, 7 Aug 2012 10:06:32 +0200 (CEST) sauer >> wrote: n> So, I'd like to "repeably randomize" an integer on a host.

Re: CFEngine Help: Integer splayclass equivalent

2012-08-10 Thread Ted Zlatanov
On Tue, 7 Aug 2012 10:06:32 +0200 (CEST) sauer wrote: n> So, I'd like to "repeably randomize" an integer on a host. n> Specifically, I'd like to use essentially the logic from splayclass or n> splaytime to pick a time to run a cron job. "Why not run the job from n> CFEngine?" Well, because the

Re: Body file control inputs?

2012-08-10 Thread Ted Zlatanov
On Wed, 08 Aug 2012 00:31:26 -0500 Nick Anderson wrote: NA> Has any thought been given to adding inputs from places other than body common control? I think it would make cf-promises unable to validate your policy, since you'd need to actually run the policy to find out the full extent of it.

Re: CFEngine Help: Service promises and reload

2012-08-10 Thread Ted Zlatanov
On Fri, 10 Aug 2012 10:07:34 +0200 (CEST) davidlee wrote: n> Mark: Thanks. But why not do both reload and restart? They have different semantics; they offer different appropriateness towards different behaviours. I agree, reload and restart should both be provided. Here's the standard Apach

Re: referencing a global variable

2012-08-07 Thread Ted Zlatanov
On Aug 7, 2012, at 7:59, Abid Khwaja wrote: > Even though I declared “dir_wl10domain" in a common bundle and thus the > variable is available globally, I still must explicitly reference it as > $(def.dir_wl10domain) when I reference it in a different bundle, as in the > above. Is this correct

Re: CFEngine Help: Service promises and reload

2012-08-04 Thread Ted Zlatanov
On Sat, 4 Aug 2012 15:34:01 +0200 (CEST) toddnni wrote: n> In my opinion "services:" promises are an elegant way to abstract n> multiple "processes:" and "commands:" promises in one promise. However n> current "service_policy =>" options are start, stop or disable, and I n> think that there shou

Re: CFEngine Help: Re: meta promise type question

2012-08-03 Thread Ted Zlatanov
On Fri, 3 Aug 2012 19:33:43 +0200 (CEST) zzamboni wrote: n> Ted, I think this has more to do with the bundle being called from a n> methods: promise than with the fact that it has arguments - removing n> the arguments results in the same problem, but adding "example2" to n> the bundlesequence ma

Re: CFEngine Help: Re: meta promise type question

2012-08-03 Thread Ted Zlatanov
On Fri, 3 Aug 2012 15:41:15 +0200 (CEST) neilhwatson wrote: n> https://cfengine.com/bugtracker/view.php?id=1226 I think my bug is not quite the same, but it's probably related so I've added my example to your bug report. Thanks Ted ___ Help-cfengine

defaults: promises in 3.4.0 with slists

2012-08-02 Thread Ted Zlatanov
On Thu, 02 Aug 2012 09:18:02 -0400 Ted Zlatanov wrote: TZ> On Thu, 2 Aug 2012 00:22:35 -0500 Diego Zamboni wrote: >>> Yup. Perhaps it could be returned by splitstring() instead of { "" }? DZ> Bug report time, I guess :) TZ> I reported it: TZ> https://cfen

meta promise type question

2012-08-02 Thread Ted Zlatanov
3.4.0 introduces meta: promise types. This example doesn't seem to DTRT. Is this a bug or am I missing something? Maybe the metadata for parameterized bundles has some other format? Thanks Ted body common control { bundlesequence => { "example" }; } bundle agent example { meta:

Re: CFEngine Help: Re: splitstring("", " ", 100) returns slist { "" }

2012-08-02 Thread Ted Zlatanov
On Thu, 2 Aug 2012 00:22:35 -0500 Diego Zamboni wrote: >> Yup. Perhaps it could be returned by splitstring() instead of { "" }? DZ> Bug report time, I guess :) I reported it: https://cfengine.com/bugtracker/view.php?id=1273 Thanks! Ted ___ Help-cf

Re: CFEngine Help: Re: Define classes if a process is running or not

2012-08-02 Thread Ted Zlatanov
On Thu, 2 Aug 2012 13:51:07 +0200 (CEST) loopx wrote: n> This one is working fine : n> processes: n> redhat_6:: n> "rhsmcertd" n> #classes=> if_ok("rhsmcertd_running"), n>

Re: CFEngine Help: Re: splitstring("", " ", 100) returns slist { "" }

2012-08-01 Thread Ted Zlatanov
On Wed, 1 Aug 2012 17:28:59 -0500 Diego Zamboni wrote: DZ> I believe that's what "cf_null" is supposed to be for: http://cfengine.com/manuals/cf3-Reference#Special-list-value-cf_005fnull Oh, I knew this!!! Thanks for pointing it out again, my brain is off today I guess. DZ> But it's not trul

Re: CFEngine Help: Re: splitstring("", " ", 100) returns slist { "" }

2012-08-01 Thread Ted Zlatanov
On Wed, 1 Aug 2012 22:48:35 +0200 (CEST) neilhwatson wrote: n> Empty lists seemed to be allowed: No, unfortunately, I don't think you can get an empty slist with regular syntax. I give you... the war of the spaces! body common control { bundlesequence => { "test" }; } bundle agent test

splitstring("", " ", 100) returns slist { "" }

2012-08-01 Thread Ted Zlatanov
It seems that splitstring("", " ", 100) returns a slist with an empty string: body common control { bundlesequence => { "test" }; } bundle agent test { vars: "spaces" slist => splitstring("", " ", "100"); reports: cfengine:: "spaces '$(spaces)'"; } => R: spaces '' To

Re: CFEngine Help: Define classes if a process is running or not

2012-08-01 Thread Ted Zlatanov
On Wed, 1 Aug 2012 12:00:00 +0200 (CEST) loopx wrote: n> To make some promise, I need to define classes like this : n> - XXX_running n> - XXX_stopped n> But, I've seen that it's possible to define classes with built-in n> methods of Cfengine3. In the community lib, I've tried to use n> "if_else

Re: Variable convergence mystery

2012-07-31 Thread Ted Zlatanov
On Tue, 31 Jul 2012 08:59:08 -0500 Nick Anderson wrote: NA> The file making the promise $(filename) gets set to different values NA> based on a class. I thought due to normal ordering, on the first pass NA> filename should get set to "/tmp/nodebug" since the debug class has not NA> been raise

Re: CFEngine Help: Re: CFEngine Help: commands promise failing

2012-07-25 Thread Ted Zlatanov
On Wed, 25 Jul 2012 16:35:11 +0200 (CEST) neilhwatson wrote: n> It is not consistent but, I have seen the same think happend manually. I would use strace and compare the output in a successful vs. unsuccessful run. It sounds like a library issue or resource exhaustion, but it's hard to tell. T

Re: CFEngine Help: How to manage different types of servers?

2012-07-25 Thread Ted Zlatanov
On Tue, 24 Jul 2012 17:23:12 +0200 (CEST) linuxgurugamer wrote: n> We have several different types of servers, which can be grouped into several main groups. For this discussion, I'll refer to the following: n> Group 1:web servers n> Group 2:database server n> I've been trying to impl

Re: CFEngine Help: commands promise failing

2012-07-25 Thread Ted Zlatanov
On Tue, 24 Jul 2012 19:02:41 +0200 (CEST) neilhwatson wrote: n> Has anyone see this? Testing with 3.4.0b1. -> Executing '/var/cfengine/bin/cf-serverd' ...(timeout=-678,owner=4294967295,group=4294967295) -> Completed execution of /var/cfengine/bin/cf-serverd -> Executing '/var/cfengine/bin/cf-ex

Re: IPv4 addresses for tun0 not showing?

2012-07-20 Thread Ted Zlatanov
On Thu, 19 Jul 2012 19:07:20 +0200 Marco Marongiu wrote: MM> On 29/06/12 22:29, Marco Marongiu wrote: >>> R: Interface: wlan0 (192.168.0.5) >>> R: Octets 1-1: $(sys.ipv4_1[tun0]) >>> R: Octets 1-2: $(sys.ipv4_2[tun0]) >>> R: Octets 1-3: $(sys.ipv4_3[tun0]) >> >> So, apparently, cfengine is abl

Re: CFEngine Help: COPBL backwards compatability

2012-07-17 Thread Ted Zlatanov
On Tue, 17 Jul 2012 20:51:17 +0200 (CEST) sauer wrote: n> Speaking of the standard library, what are the chances of more n> formally documenting the miniumum version requirement for using that n> file? I updated it recently, and found that I had to comment out a n> few chunks to retain compatabi

Re: CFEngine Help: Re: [ANNOUNCE] CFEngine 3.4.0alpha1 is released

2012-07-06 Thread Ted Zlatanov
On Fri, 6 Jul 2012 16:21:11 +0200 (CEST) neilhwatson wrote: n> Doesn't [namespacing] just push the concern to a different layer? Now my bundles can be anything but, I have to worry if my namespace is unique. Most of Computer Science and Engineering deals with pushing things to a different lay

Re: feature proposal for cfengine.el

2012-06-26 Thread Ted Zlatanov
On Sat, 23 Jun 2012 20:07:25 +0200 Marco Marongiu wrote: MM> On 22/06/12 20:05, Ted Zlatanov wrote: >> Marco and others, do you want to suggest some good blank templates for >> the various bundles and bodies? I'll take care of integrating them with >> cfengine-m

Re: CFEngine Help: Re: 3.1.4 => 3.3.4: has something changed regarding classes in bundles?

2012-06-26 Thread Ted Zlatanov
On Mon, 25 Jun 2012 12:40:37 -0400 Ted Zlatanov wrote: TZ> In Design Center, cf-sketch feeds the bundles a unique prefix for every TZ> activation, which lets you create a "canonical prefix" for each TZ> top-level bundle call. grep for "canon_prefix", you'll

Re: CFEngine Help: Re: 3.1.4 => 3.3.4: has something changed regarding classes in bundles?

2012-06-25 Thread Ted Zlatanov
On Sat, 23 Jun 2012 19:34:36 +0200 (CEST) davidlee wrote: n> As it was, the "$(key)_in_file" was OK for a single call, but could fail when called on different files with the same key. n> The revised version "$(key)_in_$(file)" allows multiple calls for the same key on different files; it adds

Re: feature proposal for cfengine.el

2012-06-22 Thread Ted Zlatanov
On Fri, 15 Jun 2012 10:47:23 -0500 Ron Parker wrote: RP> On Fri, Jun 15, 2012 at 9:57 AM, Marco Marongiu wrote: >> I found that having the promises laid out in normal order in the bundles >> can help a lot in understanding how things actually go on when the >> policy is run. >> >> It would be

Re: CFEngine Help: High Availability / High Performance Advanced Automation Cfengine Architecture

2012-06-22 Thread Ted Zlatanov
On Mon, 18 Jun 2012 18:26:48 +0200 (CEST) msvob...@linkedin.com wrote: Hi Mike, that was a very interesting and useful post. I wanted to bring up a tool I wrote on my own recently, and it's not CFEngine-specific (although it can produce a CFEngine config, it can also produce JSON and eventually

Re: which cfengine_stdlib.cf

2012-06-22 Thread Ted Zlatanov
On Thu, 21 Jun 2012 15:44:48 +0200 Bas van der Vlies wrote: BvdV> On 06/21/2012 02:50 PM, Ted Zlatanov wrote: >> On Thu, 21 Jun 2012 13:46:15 +0200 Bas van der Vlies wrote: >> I have not updated CFEngine::stdlib in Design Center from the copbl >> repository because the

Re: which cfengine_stdlib.cf

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 11:40:32 -0500 Diego Zamboni wrote: DZ> Indeed, the version in github.com/cfengine/copbl/ is the master DZ> copy, from which the others are (sometimes inconsistently) DZ> updated. We are working on cleaning up some of this to reduce DZ> confusion. DZ> Namespace support will

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 15:07:58 +0200 Riccardo Murri wrote: RM> On Thu, Jun 21, 2012 at 3:02 PM, Ted Zlatanov wrote: >> On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri >> wrote: >> RM> Would it be sensible to add a command-line switch to `cf-promises` to RM> f

Re: CFEngine Help: Reading lines into an array only if class matches

2012-06-21 Thread Ted Zlatanov
On Fri, 15 Jun 2012 21:39:46 +0200 (CEST) sauer wrote: n> So, I have a couple of situations where I want to populate an exclude n> list from an external file. For example, I want to remove the n> suid/sgid bits from executable files which are group or n> world-writeable, unless the file is in an

Re: To xdev or not to xdev

2012-06-21 Thread Ted Zlatanov
On Tue, 19 Jun 2012 15:59:36 -0500 Ron Parker wrote: RP> It's not clear to me from the reference manual. If I want to set RP> permissions on a directory and all of it's descendents that are not RP> (NFS) mounts, do I want xdev to be true or false? I think it's similar to the rsync -x flag: if

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri wrote: RM> Would it be sensible to add a command-line switch to `cf-promises` to RM> force update of `masterfiles/cf_promises_validated` ? Would it work to just say "cf-promises ... && touch masterfiles/cf_promises_validated"? Ted ___

Re: which cfengine_stdlib.cf

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 13:46:15 +0200 Bas van der Vlies wrote: BvdV> Question which cfengine_stdlib.cf to use? Is copbl repository the leading one BvdV> There is one in the copbl and one in the design-center repository and they differ: I have not updated CFEngine::stdlib in Design Center from t

Re: Has anybody put together a body package_method cpan ?

2012-06-14 Thread Ted Zlatanov
Ted Z wrote: >> `cpanm' doesn't support uninstalling, but neither does `cpan' Because of this, and because CPAN doesn't have the notion of listing installed modules, I wrote a sketch that simply runs the `cpanm' command for every Perl module you specify. I just couldn't make it a reasonable packa

Re: CFEngine Help: Re: cfengine-community service doesn't stop services properly

2012-06-14 Thread Ted Zlatanov
On Tue, 12 Jun 2012 19:49:17 +0200 (CEST) bahamat wrote: n> The default failsafe.cf includes promises that will start all three daemons. If you really want it disabled you need to do it in both places. It's not lupus. I'm really curious what you mean by "it's not lupus." Ted __

Re: arrays with lists

2012-06-14 Thread Ted Zlatanov
On Wed, 13 Jun 2012 10:18:45 -0400 Neil Watson wrote: NW> I can't recall if this is now possible with 3.3.0. Can we define a list NW> in an array and then loop the list after passing it? I do it in the db_install sketch in Design Center: "base_packages" slist => { "@($(prefix)bycontext

Re: CFEngine Help: Re: user management darwin

2012-06-14 Thread Ted Zlatanov
On Thu, 14 Jun 2012 13:22:38 +0200 (CEST) bernhard.gl...@ecologic.eu wrote: n> Didn't find any way to deliver a shadowed passwort/secret to the darwin auth system. n> Instead we can simply copy the users plist. n> This works at least in OSX 10.7.4 Could you show the solution? That sounds ver

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

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 wa

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

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: CFEngine Help: Re: CFEngine Help: git promises

2012-05-22 Thread Ted Zlatanov
On Tue, 22 May 2012 18:25:20 -0500 Nick Anderson wrote: NA> On 05/22/2012 03:36 PM, Ted Zlatanov wrote: >> How about vcs_mirror? That's pretty clear and the term is not used by >> Git or Subversion. If you agree I'll make the change on my side. NA> Works fo

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

2012-05-22 Thread Ted Zlatanov
On Tue, 22 May 2012 15:11:23 -0500 Nick Anderson wrote: NA> So in general are you preferring prefix to passing an array name with NA> new sketches? And also are you preferring a single usebundle call for NA> each different configuration? Yes, and yes. It makes passing data between JSON, Perl,

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

2012-05-22 Thread Ted Zlatanov
On Tue, 22 May 2012 12:50:39 -0500 Nick Anderson wrote: NA> On 05/21/2012 02:51 PM, Ted Zlatanov wrote: >> Nick, see if you can duplicate the bug on your side and I'll open the >> ticket. No rush, I have the fix above in place. NA> I tried to use it manually and none o

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

2012-05-21 Thread Ted Zlatanov
On Mon, 21 May 2012 15:51:11 -0400 Ted Zlatanov wrote: TZ> On Mon, 21 May 2012 15:21:20 -0400 Ted Zlatanov wrote: TZ> bundle agent vcs_freshclone(prefix) TZ> { TZ> vars: TZ> "bundle_home" string => dirname("$(this.promise_filename)"), TZ> policy =>

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

2012-05-21 Thread Ted Zlatanov
On Mon, 21 May 2012 15:21:20 -0400 Ted Zlatanov wrote: TZ> But it seems like `this.promise_filename' refers to the top-level TZ> (i.e. runme.cf) filename, even though the vcs_freshclone promises are TZ> made in a different file. This makes it impossible to find templates TZ>

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

2012-05-21 Thread Ted Zlatanov
One more improvement: the .git/config file is now enforced :) This means that it's pretty much impossible for an attacker to make you check out the wrong thing, even if they can modify the .git/config file (they can always exploit a race condition, but it's still an improvement). But it seems lik

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

2012-05-19 Thread Ted Zlatanov
On Fri, 18 May 2012 17:00:15 -0400 Ted Zlatanov wrote: TZ> OK, pushed to https://github.com/tzz/design-center.git I ran into one issue with the vcs_freshclone sketch, the vcs_configfile variable is not defined in time on the first pass, so it always tries to clone. I had to force just one

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

2012-05-18 Thread Ted Zlatanov
On Fri, 18 May 2012 15:17:12 -0400 Ted Zlatanov wrote: TZ> cfsketch itself will make it possible to activate this multiple times, TZ> so you don't have to deal with passing a 2-level array to describe TZ> multiple repositories. TZ> Although it will only support Git for now

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

2012-05-18 Thread Ted Zlatanov
On Thu, 17 May 2012 20:27:03 -0500 Nick Anderson wrote: NA> Hey Analogue, I submitted a pull request to the design-center earlier NA> today with a sketch that I think does what you were looking for. NA> https://github.com/cfengine/design-center/pull/49 NA> https://github.com/nickanderson/desig

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

2012-05-17 Thread Ted Zlatanov
On Thu, 17 May 2012 12:51:39 -0500 Nick Anderson wrote: NA> Any new status updates on cfsketch to come along with that? Real Soon Now ;) Ted ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

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

2012-05-17 Thread Ted Zlatanov
On Thu, 17 May 2012 12:34:10 -0500 Nick Anderson wrote: NA> On 05/17/2012 12:31 PM, Ted Zlatanov wrote: >> On Thu, 17 May 2012 12:25:53 -0500 Nick Anderson wrote: NA> On 05/16/2012 03:44 PM, Ted Zlatanov wrote: >>>> I'd love to see native pluggable CFEngine s

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

2012-05-17 Thread Ted Zlatanov
On Thu, 17 May 2012 12:25:53 -0500 Nick Anderson wrote: NA> On 05/16/2012 03:44 PM, Ted Zlatanov wrote: >> I'd love to see native pluggable CFEngine support for VCS pulls, like it >> has for package management. NA> That would be cool. It seems to be a pattern I do a lot

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

2012-05-16 Thread Ted Zlatanov
On Wed, 16 May 2012 14:33:03 -0500 Nick Anderson wrote: NA> On 05/16/2012 02:28 PM, no-re...@cfengine.com wrote: >> bundle agent git_master >> { >> commands: >> "/usr/bin/git pull origin" >> comment => "Update /repo from git repository", >> contain => silent_in_dir("/repo"); >> } NA> What hap

Re: CFEngine Help: Re: Thoughts of encrypting the entire Cfengine workspace?

2012-04-30 Thread Ted Zlatanov
On Mon, 30 Apr 2012 10:09:37 -0500 Nick Anderson wrote: NA> Well I think if we approach this with the expectation that we will stop NA> someone with root access from doing anything then we just performing an NA> exercise in futility. NA> You could argue that security is only the the inverse of

Re: CFEngine Help: Re: Thoughts of encrypting the entire Cfengine workspace?

2012-04-30 Thread Ted Zlatanov
On Mon, 30 Apr 2012 16:24:52 +0200 (CEST) msvob...@linkedin.com wrote: n> Giving developers root access to development machines is a known evil. n> I would rather not give root access to people who aren't n> administrators, but in reality, this doesn't happen. n> Folks that run QA, performance e

Re: Thoughts of encrypting the entire Cfengine workspace?

2012-04-28 Thread Ted Zlatanov
On Thu, 26 Apr 2012 22:08:56 +0200 (CEST) msvob...@linkedin.com wrote: ms> Most exploits / data loss happen from _within_ the organization. If I ms> give a developer / fellow co-worker root access to a machine inside ms> our network, he can snoop around the Cfengine area and see things he ms> re

Re: CFEngine Help: System booting without networking, cfengine hangs

2012-04-28 Thread Ted Zlatanov
On Fri, 27 Apr 2012 23:56:49 +0200 Mikhail Gusarov wrote: MG> On 27.04.2012 23:22, no-re...@cfengine.com wrote: >> Is there a way to tell cfengine not to start if there is no networking up >> without hacking startup script? MG> It does not hang, but it tries to resolve IP address into DNS nam

Re: edit_template and lists

2012-04-20 Thread Ted Zlatanov
On Wed, 18 Apr 2012 11:35:01 +0200 Bas van der Vlies wrote: BvdV> I am using slist because configuration parameters can contain more then one value. For most configuration files BvdV> it is nice that a 'list' variable is repeated multiple times, eg: BvdV> [%CFEngine BEGIN %] BvdV> search $(te

Re: tidy/prettyprint for cfengine3 ?

2012-04-05 Thread Ted Zlatanov
On Thu, 5 Apr 2012 05:59:35 -0700 Aleksey Tsalolikhin wrote: AT> Hi. Is there a tidy or pretty-print program for CFEngine 3? AT> I am just looking for something to make sure there is uniform AT> indentation style in my examples, I've got like 200 of them by now and AT> I don't want to correct t

Re: CFEngine Help: Re: Config file where order matters

2012-04-04 Thread Ted Zlatanov
On Tue, 3 Apr 2012 20:45:08 +0200 (CEST) sauer wrote: n> I've been working on this for sudoers, where later entries override n> earlier entries. The way I'm currently doing it is to have a n> directory full of small templates which start with a number. It looks n> like the new lsdir function w

Re: What are you using modules for?

2012-03-22 Thread Ted Zlatanov
On Tue, 20 Mar 2012 21:53:37 -0500 Nick Anderson wrote: NA> I'm just curious. At what point do you decide a module is better than doing things natively? At JOB^1 I wrote a Perl script to look up company inventory metadata and feed it to cfengine through the module interface. The script was m

Re: CFEngine Help: Re: Server load and client installation

2012-03-13 Thread Ted Zlatanov
On Tue, 13 Mar 2012 09:30:04 -0500 Nick Anderson wrote: NA> On 03/13/2012 09:22 AM, Mikhail Gusarov wrote: >> Something like "git clean -fxd"? NA> Something like that. When I do it with svn I like to track which files NA> had which state so I can send a report to the person who cared about the

Re: CFEngine Help: Re: Server load and client installation

2012-03-13 Thread Ted Zlatanov
On Mon, 12 Mar 2012 18:43:52 -0500 Nick Anderson wrote: NA> I'm kind of surprised that rsync is so much faster than svn update. But NA> I haven't tried to use subversion to distribute lots of files, only used NA> for small trees. But i seem to use subversion for distributing small NA> trees a lo

Re: dynamic bundlesequence - Neil's example breaks if the soft class is defined within the promise file

2012-02-28 Thread Ted Zlatanov
On Fri, 24 Feb 2012 07:35:34 -0800 Aleksey Tsalolikhin wrote: AT> This site has been using CFEngine 2 for 5 years and they have a very AT> large policy set. We're talking thousands or more of little inputs files. AT> They do EVERYTHING in CFEngine. Their system architect teaches all AT> their

Re: CFEngine Help: Divide Repository

2012-02-21 Thread Ted Zlatanov
On Tue, 21 Feb 2012 12:54:44 +0100 (CET) rsdejo...@gmail.com wrote: n> I have a question , n> We want to copy the repository files to rhel 5 + 6 and sles 9 / 10 / 11 n> I know how to divide into OS ,but how do you divide further in the tree ? n> example => /etc/yum.repos.d/baseline.repo n> It

Re: CFEngine Help: CFEngine Help:Health check for cf-agent

2012-01-06 Thread Ted Zlatanov
On Wed, 4 Jan 2012 04:25:56 +0100 (CET) bughari wrote: n> Is there command available in cfengine3 to do health check of all cf-agent is active and talking to cf-serverd which we can run from cfengine master server. You could use loggly or Splunk or plain syslog or something similar to collect

Re: Master to client security, signing?

2012-01-01 Thread Ted Zlatanov
On Wed, 28 Dec 2011 13:13:13 + Michael Gliwinski wrote: MG> Another option which I'm considering now is to let managed nodes MG> pull from VCS directly into their own masterfiles and change policy MG> in update.cf to just copy locally into inputs/ modules/ etc. after MG> doing some local pr

Re: Capturing change detection output

2011-12-20 Thread Ted Zlatanov
On Mon, 19 Dec 2011 13:42:03 -0600 Nick Anderson wrote: NA> What would the best way to capture a list of the files detected changed NA> into a list? Use etckeeper+Git, it will do a much better job, especially if you snapshot often. Then you just use Git commands from CFEngine or outside (which

Re: CFEngine Help: Re: CFEngine Help: Thoughts about some cfengine design decisions?

2011-12-16 Thread Ted Zlatanov
On Fri, 16 Dec 2011 15:53:10 +0100 (CET) neilhwatson wrote: n> One other point comes to mind if you'll indulge me again. I think this was n> mentioned before. Passing parameters to bundles. I'd like to see this done n> better. The current positional approach is very limited. It might be hel

Re: CFEngine Help: Thoughts about some cfengine design decisions?

2011-12-16 Thread Ted Zlatanov
On Fri, 16 Dec 2011 08:06:32 +0100 Mark Burgess wrote: MB> Please forget you ever saw this. Saw what?!?!? MB> This might look superficially attractive to a programmer but it MB> suffers from many problems, not the least of which would be a major MB> increase in the size and complexity of the p

Re: CFEngine Help: Re: CFEngine Help: Thoughts about some cfengine design decisions?

2011-12-16 Thread Ted Zlatanov
On Fri, 16 Dec 2011 11:13:29 +0100 (CET) lauwersw wrote: n> But your comment made me think: maybe "local" classes should remain, but be transformed in "scoped" classes, so they can be accessed from other bundles as well. I think local classes should remain as they are, but the user should have

Re: cannot use cfengine3 mode in Emacs 23

2011-12-16 Thread Ted Zlatanov
On Tue, 13 Dec 2011 15:50:33 -0600 Ted Zlatanov wrote: TZ> On Wed, 07 Dec 2011 14:43:00 +0100 Marco Marongiu wrote: MM> The bad ones: as soon as I did it, font-locking broke. The following MM> error appears in the *Messages* window: >>> Error during redisplay: (void-

Re: Is this the idiom for if...else?

2011-12-15 Thread Ted Zlatanov
On Wed, 14 Dec 2011 15:50:13 + (GMT) Mark Dixon wrote: MD> OK, so this works because of rule 5 of agent normal ordering ("The MD> order of promises within one of the above types follows their top-down MD> ordering within the bundle itself") from the reference manual? MD> http://cfengine.co

Re: Is this the idiom for if...else?

2011-12-14 Thread Ted Zlatanov
On Wed, 14 Dec 2011 14:54:02 + (GMT) Mark Dixon wrote: MD> How would you cleanly do an if..elif..else ? The example you give MD> appears to be an if..else. cfengine doesn't have that. It has a switch statement, really, but it will spin through the switch until it's settled (up to 3 passes

Re: CFEngine Help: Thoughts about some cfengine design decisions?

2011-12-14 Thread Ted Zlatanov
While we're discussing fundamentals... :) Some small ideas I think may be useful to the cfengine users: 1) allow passing body parameters as JSON, not just positional parameters. Take the standard file permissions promise: "$(crond)/cfrun" perms => mo("644","root"); it instead become

Re: Is this the idiom for if...else?

2011-12-14 Thread Ted Zlatanov
On Wed, 14 Dec 2011 10:08:22 + (GMT) Mark Dixon wrote: MD> However, it wasn't the "if" bit I was fuzzy about, it was how people use MD> the language to do the job of an "if..elif..else" construct in the MD> clearest and least fragile way. MD> Extending the example on the devops page naiv

Re: cannot use cfengine3 mode in Emacs 23

2011-12-13 Thread Ted Zlatanov
On Wed, 07 Dec 2011 14:43:00 +0100 Marco Marongiu wrote: MM> The bad ones: as soon as I did it, font-locking broke. The following MM> error appears in the *Messages* window: >> Error during redisplay: (void-variable font-lock-constant-name-face) MM> Now class names are black as normal text (t

Re: CFEngine Help: Re: CFEngine viable alternative to Kaseya?

2011-12-13 Thread Ted Zlatanov
On Sat, 3 Dec 2011 00:58:10 +0100 (CET) theaccount wrote: n> Is there a tool that you would recommend for remote script execution? I know some people that use func (Python tool) and are happy with it. Rundeck is also interesting. Ted ___ Help-cfengin

Re: CFEngine Help: New Book on Cfengine

2011-12-13 Thread Ted Zlatanov
On Wed, 07 Dec 2011 23:56:19 +0100 Nicolas Charles wrote: >> Check it out here http://www.packtpub.com/cfengine-3-beginners-guide/book NC> I've ordered this book a couple of weeks ago and start to review it, to NC> see if my team would learn from it. I really have mixed feelings about NC> th

Re: cannot use cfengine3 mode in Emacs 23

2011-12-07 Thread Ted Zlatanov
On Fri, 02 Dec 2011 10:38:14 -0500 Ted Zlatanov wrote: TZ> For the attribute 0 indent, it's a feature but I can change it to give TZ> an optional extra indent to continued lines. I was trying to make the TZ> appearance uniform and consistent but I see how it can be useful

Re: cannot use cfengine3 mode in Emacs 23

2011-12-02 Thread Ted Zlatanov
On Fri, 02 Dec 2011 16:48:38 +0100 Mikhail Gusarov wrote: MG> On 12/02/2011 04:44 PM, Ted Zlatanov wrote: MG> Could you ask Emacs guys (or make a patch yourself) to rename MG> cfengine-mode to cfengine2-mode, or something similar? >> >> That would break backwards comp

Re: cannot use cfengine3 mode in Emacs 23

2011-12-02 Thread Ted Zlatanov
On Fri, 02 Dec 2011 15:59:49 +0100 Mikhail Gusarov wrote: MG> Ted, MG> On 11/25/2011 02:26 PM, Ted Zlatanov wrote: >> cfengine SVN maintainers: please review the attached file and especially >> the copyright notice. I believe it's no different from before as far as >

Re: cannot use cfengine3 mode in Emacs 23

2011-12-02 Thread Ted Zlatanov
On Fri, 02 Dec 2011 15:47:06 +0100 Marco Marongiu wrote: MM> I confirm the following: MM> My platform: Ubuntu 10.04.3 LTS (as appears in motd) MM> My Emacs: MM> This is GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) MM> of 2011-03-04 on palmer, modified by Debian ... MM> I confirm

Re: cannot use cfengine3 mode in Emacs 23

2011-12-01 Thread Ted Zlatanov
On Tue, 29 Nov 2011 08:55:46 -0500 Ted Zlatanov wrote: TZ> On Mon, 28 Nov 2011 17:21:06 +0100 Marco Marongiu wrote: MM> I've just done a quick test, and things seem to work smoothly (GNU Emacs MM> 23.1.1 running on Ubuntu Linux 10.04 LTS) TZ> On Mon, 28 Nov 2011 17:

Re: use Cfengine to clone server configuration

2011-12-01 Thread Ted Zlatanov
On Wed, 30 Nov 2011 20:15:56 -0800 (PST) "Carl E. Ma" wrote: CEM>  I am new to Cfengine3. Is it possible to use cfengine to clone one server's configuration to another server? CEM> My intention is using cfengine to deploy system/application CEM> configuration change on VM host. If this host c

Re: CFEngine Help: Re: putting cfengine mailing list on Gmane?

2011-11-29 Thread Ted Zlatanov
On Wed, 23 Nov 2011 15:45:24 +0100 (CET) no-re...@cfengine.com wrote: n> Forum: CFEngine Help n> Subject: Re: putting cfengine mailing list on Gmane? n> Author: zzamboni n> Link to topic: https://cfengine.com/forum/read.php?3,23979,24049#msg-24049 n> List archiving has resumed under http://dir.

  1   2   >