Re: getindices from array problems

2012-10-02 Thread Diego Zamboni
Jose, If you move the policy_server_show bundle to *after* the define_policy_server_array bundle, then it works fine. This seems to be a bug - ordering of bundles within the file should not affect their execution. Would you mind filing one under https://cfengine.com/dev ? Thanks, --Diego On

Re: CFEngine Help: Re: auto-scrolling website

2012-10-01 Thread Diego Zamboni
I knew I had seen the instructions somewhere :) Thanks Nick for the reminder! --Diego On Oct 1, 2012, at 7:39 PM, Nick Anderson wrote: > On 10/01/2012 05:38 PM, Diego Zamboni wrote: >> Can you point me to a reference on how to implement one? I'd be happy to do >> it. >

Re: CFEngine Help: Re: auto-scrolling website

2012-10-01 Thread Diego Zamboni
Can you point me to a reference on how to implement one? I'd be happy to do it. I personally use it by defining a search keyword and using it directly from the URL bar. I believe Firefox supports them natively, for Safari I use the KeySearch extension: http://www.macosxtips.co.uk/keysearch/help

Re: CFEngine 3.3.5 does not like {{{ classes: "webclass" or => { "@(webservers)" }; }}} (Was: Re: CFEngine Help: Re: False report of "no constrants" in constrained classes promises.)

2012-09-24 Thread Diego Zamboni
> I got: Unable to parse class expression: ->@(webservers) I think you need to use it without the quotes. --Diego ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: a small (aesthetic) bug in set_variable_values bundle

2012-09-23 Thread Diego Zamboni
Hey Aleksey, Thanks for the contribution! Definitely, if you think it's worth the update, please submit a pull request to the copbl repository on github: http://github.com/cfengine/copbl/ Also, thanks for the kind words, but set_variable_values was not written by me, it was there before :) We

Re: CFEngine Help: Re: Namespace change

2012-09-14 Thread Diego Zamboni
>> Ok, thanks. Having a file control body works the same way as classes and >> whatnot, where everything below that definition in the same file has a >> namespace changed from default to whatever's specified? That's reasonable. > > Actually I think it applied to the entire file, regardless of

Re: CFEngine Help: Re: Namespace change

2012-09-14 Thread Diego Zamboni
> Ok, thanks. Having a file control body works the same way as classes and > whatnot, where everything below that definition in the same file has a > namespace changed from default to whatever's specified? That's reasonable. Actually I think it applied to the entire file, regardless of where t

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

2012-09-13 Thread Diego Zamboni
Hi Aleksey, Thank you very much for the contribution! I think this might be a better fit for the Design Center than to the COPBL, given that it performs a specific, higher-level task (rather than a generic, lower-level task, which is what we try to keep in the stdlib). We are in the process of

Re: Using vars inside commands

2012-09-11 Thread Diego Zamboni
That should work fine. Are you sure the list is being properly populated? --Diego On Sep 11, 2012, at 6:00 PM, "André Luís Lopes" wrote: Hello, I just wanted to double-check with you guys if using a var inside a command really doesn't work in CFEngine3. Example : vars: "java_binary

Re: CFEngine Help: Re: Raise a class when class thing1 but not class thing2

2012-09-09 Thread Diego Zamboni
This can probably be simplified further to avoid so many temporary variables. --Diego class_when_thing1_but_not_thing2.cf Description: Binary data On Sep 7, 2012, at 1:29 PM, Nick Anderson wrote: > On 09/07/2012 01:17 PM, Diego Zamboni wrote: >> On a quick look, I think you need to p

Re: Overriding/setting array variables with a list

2012-09-09 Thread Diego Zamboni
Nick, You are indeed hitting a bug, this one: https://cfengine.com/bugtracker/view.php?id=904 The workaround is to condition the getindices() so that it happens only on the second pass, with something like this: secondpass:: "array_keys" slist => getindices("local_array"); classes

Re: CFEngine Help: Re: Raise a class when class thing1 but not class thing2

2012-09-07 Thread Diego Zamboni
On a quick look, I think you need to put the not() outside classify() and not inside. Not tested. --Diego On Sep 7, 2012, at 12:04 PM, Nick Anderson wrote: > On 09/07/2012 11:53 AM, no-re...@cfengine.com wrote: >> Forum: CFEngine Help >> Subject: Re: Raise a class when class thing1 but not clas

Re: cfengine doesn't define class with the IPs of the loopback interface

2012-09-06 Thread Diego Zamboni
a pool of servers. > > On Thu, 2012-09-06 at 16:08 -0500, Diego Zamboni wrote: >> Aliaksei, >> >> Honestly, I had never heard of a loopback interface being assigned a >> routable IP address. I guess this is why CFEngine ignores it when >> collecting information

Re: cfengine doesn't define class with the IPs of the loopback interface

2012-09-06 Thread Diego Zamboni
Aliaksei, Honestly, I had never heard of a loopback interface being assigned a routable IP address. I guess this is why CFEngine ignores it when collecting information about the system. This seems to be hardcoded behavior, don't know how easy it would be to change. --Diego On Sep 3, 2012, at

Re: indentation and insert_lines

2012-09-03 Thread Diego Zamboni
Anderson wrote: > On 09/03/2012 05:10 AM, Gregory Matthews wrote: >>> On 31/08/12 17:30, Diego Zamboni wrote: >>>> Greg, >>>> >>>> You could split the lines into a list, then you can still pass them to >>>> insert_lines but they will not

Re: indentation and insert_lines

2012-08-31 Thread Diego Zamboni
Greg, You could split the lines into a list, then you can still pass them to insert_lines but they will not be indented. Just separate them by commas in your code, should work fine. --Diego On Aug 31, 2012, at 7:56 AM, Gregory Matthews wrote: > how do ppl reconcile indentation for readability

Re: CFEngine Help: Re: classnames constructed with "$(foo)": how to canonify in "common"?

2012-08-28 Thread Diego Zamboni
I didn't see those messages either - only the ones warning about "/weird/" containing invalid characters. --Diego On Aug 28, 2012, at 3:05 AM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: classnames constructed with "$(foo)": how to canonify in > "common"? > Author: davi

Re: CFEngine Help: Contrived example : getindices returns an empty list

2012-08-28 Thread Diego Zamboni
It's a known bug: dynamically-added array elements are only visible to getindices() and getvalues() until the next pass over the policy. See https://cfengine.com/bugtracker/view.php?id=904 for a description and workaround. --Diego On Aug 28, 2012, at 3:02 AM, no-re...@cfengine.com wrote: > Fo

Re: CFEngine Help: Re: CFEngine Help: build error

2012-08-10 Thread Diego Zamboni
Did you also run autogen.sh again? --Diego On Aug 10, 2012, at 8:50 PM, "no-re...@cfengine.com" wrote: > Forum: CFEngine Help > Subject: Re: CFEngine Help: build error > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,27013,27014#msg-27014 > > Did a 'make distclean' b

Re: CFEngine Help: build error

2012-08-10 Thread Diego Zamboni
Neil, I had some strange compile errors (similar to yours) on my github checkout the other day - solved them by doing a "make distclean" and then running autogen.sh from scratch. Maybe this will work? --Diego On Aug 10, 2012, at 7:29 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help >

Re: Body file control inputs?

2012-08-10 Thread Diego Zamboni
I think it would make it easier to modularize policies, by not having to list all inputs at the top level. For example, currently to integrate the cf-sketch generated runfile in a main promises.cf, you have to (a) load the file, (b) declare additional inputs using a bundle variable, and (c) call

Re: Body file control inputs?

2012-08-08 Thread Diego Zamboni
It's been mentioned, but AFAIK there's nothing serious planned about it. The appearance of "body control file" in 3.4.0 would open the door for additional file-specific attributes. For now it only allows "namespace": https://cfengine.com/manuals/cf3-Reference#control-file Maybe file a feature r

Re: cf3-quickstart still mentions BerkeleyDB as prereq?

2012-08-02 Thread Diego Zamboni
Erland, would you mind filing a bug report about this so it gets fixed? You can do that at http://cfengine.com/bugtracker/ Thanks, --Diego On Aug 2, 2012, at 4:47 PM, Erlend Leganger wrote: > Checking [1] for looking into how to compile cf3 v3.3/.xv3.4.x on > Solaris 10, I find "Prior to inst

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

2012-08-01 Thread Diego Zamboni
> Yup. Perhaps it could be returned by splitstring() instead of { "" }? Bug report time, I guess :) --Diego ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

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

2012-08-01 Thread Diego Zamboni
I believe that's what "cf_null" is supposed to be for: http://cfengine.com/manuals/cf3-Reference#Special-list-value-cf_005fnull But it's not truly an empty list, just for iteration. --Diego On Aug 1, 2012, at 4:39 PM, Ted Zlatanov wrote: > On Wed, 1 Aug 2012 22:48:35 +0200 (CEST) neilhwatson

Re: CFEngine Help: Re: Variable convergence mystery

2012-07-31 Thread Diego Zamboni
Hi Neil, > I've learned something new today. Now I had a question. If agent re-evaluates > vars and classes more than in the normal ordering of other promise types then > what is the algorithm? How can we mortals similate in our minds what the > agent will do? I honestly don't know the details

Re: CFEngine Help: Re: Order/dependency problem

2012-07-31 Thread Diego Zamboni
Indeed, handles and depends_on attributes are only for documentation purposes and for the knowledge map in Enterprise. --Diego On Jul 31, 2012, at 9:14 AM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: Order/dependency problem > Author: nickanderson > Link to topic: https:/

Re: Variable convergence mystery

2012-07-31 Thread Diego Zamboni
Nick, There is a bit of magic to properly resolve class-variable dependencies. This is mentioned in the reference guide: https://cfengine.com/manuals/cf3-Reference#Agent-normal-ordering CFEngine tries to keep variable and class promises before starting to consider any other kind of promise. In

Re: CFEngine Help: Re: Append the content of file to another one without checking for duplicate lines

2012-07-26 Thread Diego Zamboni
I think inserting a file between two markers should work fine - the only problem would be if there are duplicate lines in the file, then only one of them would be inserted. There might be a case for "file_preserve_block", but I don't know what the implications would be. Maybe one of the develop

Re: CFEngine Help: Re: Var in var : limitation ?

2012-07-26 Thread Diego Zamboni
That construct should work fine in most cases. Can you provide a self-contained example that demonstrates the problem? --Diego On Jul 26, 2012, at 10:02 AM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: Var in var : limitation ? > Author: loopx > Link to topic: https://cfen

Re: CFEngine Help: Re: delete_lines and select region

2012-07-24 Thread Diego Zamboni
Right - it seems the delete_lines is deleting on the second pass the lines inserted by the first pass, which is strange. This should not be happening - I'll investigate and try to figure out what's going on. --Diego On Jul 24, 2012, at 1:24 PM, no-re...@cfengine.com wrote: > Forum: CFEngine

Re: CFEngine Help: Re: CFEngine Help: building cfengine with libvirt support

2012-07-20 Thread Diego Zamboni
I'd try --with-libvirt=/usr/include/libvirt as option to configure. --Diego On Jul 20, 2012, at 1:47 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: CFEngine Help: building cfengine with libvirt support > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read

Re: CFEngine Help: building cfengine with libvirt support

2012-07-20 Thread Diego Zamboni
Neil, It just occurred to me - you probably need libvirt-devel installed, for the include files. --Diego On Jul 20, 2012, at 1:30 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: building cfengine with libvirt support > Author: neilhwatson > Link to topic: https://cfengine.co

Re: Mapping from DISA Stig references to Mitre CCE reference #s

2012-07-13 Thread Diego Zamboni
Hi Carolyn, I don't know of such a mapping, and couldn't find one in a quick search. I suppose in principle it might be possible to generate it because CCE includes references, but AFAICT, all STIG references it includes are to the STIG for Windows 2003, I couldn't see any references to STIG fo

Re: Vagrant Project on Github

2012-07-05 Thread Diego Zamboni
Excellent, Nick, thank you for putting this together. Coming up in the Vagrant CFEngine provisioner: installation and configuration of Design Center sketches :) --Diego On Jul 5, 2012, at 10:12 AM, Nick Anderson wrote: > I have a Vagrant project on github, its supposed to make it easy for you

Re: Is it possible to abstract out the libvirt, pgsql and mysql components for packaging?

2012-07-04 Thread Diego Zamboni
Caitlyn, You can use the options --without-libvirt --without-mysql --without-postgresql to disable those features when configuring cfengine. However, I would suggest reconsidering if the added complexity of splitting CFEngine into multiple packages is worth the potential gains. For example, the

Re: CFEngine Help: It is possible to uses a slist variable in the inputs irective ?

2012-06-22 Thread Diego Zamboni
You need to remove the quotes around the list. --Diego > > > Forum: CFEngine Help > > Subject: It is possible to uses a slist variable in the inputs > > directive ? > > Author: ydast...@caesars.com > > Link to topic: > > https://cfengine.com/forum/read.php?3,26281,26281#msg-26281 > > > > H

Re: which cfengine_stdlib.cf

2012-06-21 Thread Diego Zamboni
Hi Bas, Indeed, the version in github.com/cfengine/copbl/ is the master copy, from which the others are (sometimes inconsistently) updated. We are working on cleaning up some of this to reduce confusion. Namespace support will help reduce a lot of potential name collisions among Design Center

Re: distributing secrets

2012-06-13 Thread Diego Zamboni
Neil, With CF3 Enterprise, you could use remotescalar() or hubknowledge(), which allow you to fetch values from remote CFEngine hosts, then you could have the values stored only on the hub. https://cfengine.com/manuals/cf3-Reference#Function-hubknowledge https://cfengine.com/manuals/cf3-Referen

Re: Has anybody put together a body package_method cpan ?

2012-06-07 Thread Diego Zamboni
(posting this on behalf of Ted Zlatanov, who has some problem with his email account) > On Tue, 5 Jun 2012 15:23:10 -0400 Jesse Becker > wrote: > > JB> On Tue, Jun 05, 2012 at 03:18:10PM -0400, Neil Watson wrote: >>> On Tue, Jun 05, 2012 at 11:51:26AM -0700, Aleksey Tsalolikhin wrote: Hi

Re: Commands and environment variables

2012-06-01 Thread Diego Zamboni
Hi Nick, What is the value of $(user)? And as what user are you running cf-agent? --Diego On Jun 1, 2012, at 1:47 PM, Nick Anderson wrote: > I stumbled on this script today that is using env $HOME and when run > from cfengine it always sees that variable as roots home. > > I thought that uses

Re: CFEngine, coud you please update the PDF version of the Reference Manual? (3.2.0a, 29 June 2011)

2012-05-09 Thread Diego Zamboni
Hi Aleksey, The new location of the PDF manual is at https://cfengine.com/manuals_sources/cf3-Reference.pdf. This is linked to from the manual page at https://cfengine.com/manuals/cf3-reference (see the PDF icon at the top right). The old URL still has that old version - thanks for pointing it

Re: edit_template and lists

2012-04-18 Thread Diego Zamboni
Hi Bas, I don't think this can be done at the moment, other than by manually creating the string variable and using it in the template. It would be nice, maybe open a feature request? --Diego On Apr 18, 2012, at 4:35 AM, Bas van der Vlies wrote: > > For generation of configuration files i a

Re: Hierarchical Copying

2012-04-16 Thread Diego Zamboni
> I don't understand why the non digest based copy works without > files_single_copy though. It shouldn't - what are you using to compare? If using times, could it be that the mtimes of the files are such that only the first one is copied? Otherwise it might be a bug. --Diego

Re: Hierarchical Copying

2012-04-16 Thread Diego Zamboni
Hi Nick, You are missing the files_single_copy attribute: body agent control { # Single copy for all files files_single_copy => { ".*" }; } --Diego On Apr 16, 2012, at 9:17 PM, Nick Anderson wrote: > Am I missing something obvious here? It seems like if I try to do a > hierarchical copy and

Re: Is there a version of set_variable_values for space separated name/value lines?

2012-04-02 Thread Diego Zamboni
Hi Aleksey, It's called set_config_values, it is present in the latest from the cfengine/copbl github repo. Cheers, --Diego On Apr 2, 2012, at 5:36 PM, Aleksey Tsalolikhin wrote: > Hi. Is there a version of set_variable_values for space separated > name/value lines? > > I'm looking for som

Re: Cf-agent Fatal Error!

2012-03-23 Thread Diego Zamboni
Hi Jan, You need to use -f to specify the input file, like this: ./cf-agent.exe -v -f /var/cfengine-3.2.3/inputs/cftest.cf --Diego On Mar 23, 2012, at 5:02 PM, Jan Muhammad wrote: > Hi Group, > > I am testing CFengine 3.2.3 on a Windows 7 (using Cygwin); all seem to be > fine, even there's n

Re: Why I must use AddInstallable in my case?

2012-03-18 Thread Diego Zamboni
If you are getting started, there is no reason to use CFEngine 2, which is discontinued. CFEngine 3 is much more capable and actively developed and supported. --Diego On Mar 18, 2012, at 7:03 AM, "54netkey" <54net...@gmail.com> wrote: > hi,all > > I'm a newbie of cfengine. I am using 2.2

Re: CFEngine Help: Bundle meta data

2012-03-15 Thread Diego Zamboni
This is a fascinating discussion. Of the options that have been proposed so far, I like the metadata: promise type the best, because it avoids any potential conflict of using reserved variable names. To make the promisers meaningful and to force the metadata to be associated to the current bun

Re: Help: Getting start doc/book

2012-03-14 Thread Diego Zamboni
Hi Eric, > Oh yeah, I heard about the the learning CFengine 3 is a fantastic book > here. So when it will be released as the official release? It should be around March 20th. Best regards, --Diego ___ Help-cfengine mailing list Help-cfengine@cfengine.

Re: Help: Getting start doc/book

2012-03-14 Thread Diego Zamboni
> Diegos learning cfengine 3 is great. You can buy the pre release now. Thanks for the recommendaton, Nick. Eric, if you are interested, the book's web page is at http://cf-learn.info/ --Diego ___ Help-cfengine mailing list Help-cfengine@cfengine.org

Re: Execute command before reparation

2012-03-11 Thread Diego Zamboni
What is the recommended way of restarting networking after making changes in Debian? That is the command you should execute then, instead of "/etc/init.d/networking restart". I haven't used Debian in a while, but I can't believe you are expected to stop network services before making any change

Re: Unexpected behavior with replace_or_add from stdlib

2012-03-06 Thread Diego Zamboni
> I believe it's because the line you are matching (HOSTNAME=node1) is > present, and the regexp matching the search line is not anchored to the > end of the line > Using this regexp solved the issue : > "^(?!$(line)$)$(pattern)$" > > (note the extra $ after line) Good catch, and thanks for the

Re: packages: overly verbose at -I

2012-02-29 Thread Diego Zamboni
Ian, Normal "-I" output is prefixed by "->". Lines starting with "Q: " are standard output produced by any commands executed by CFEngine, and are produced regardless of the -I flag, if there is any output from the commands (try it - run your file without the -I flag, you will still see the "Q:"

Re: Is source RPM available for prebuilt community pacakges?

2012-02-29 Thread Diego Zamboni
Sorry, my bad, I see now that you meant the source rpms. I don't think those are made available, but you can download the source files from https://cfengine.com/source-code. --Diego On Feb 29, 2012, at 10:57 AM, Diego Zamboni wrote: > All the binary packages are available

Re: Is source RPM available for prebuilt community pacakges?

2012-02-29 Thread Diego Zamboni
All the binary packages are available at https://cfengine.com/inside/myspace (you need to create a cfengine.com account first) --Diego On Feb 29, 2012, at 2:48 AM, Kaiwang Chen wrote: > 2012/2/29 Kaiwang Chen : >> Hi all, >> >> >> The binaries are good, and I'd like to get into some details.

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

2012-02-23 Thread Diego Zamboni
Aleksey, Not sure why this behaves like that. As a solution, you could use the second method described by Neil (and which I very much prefer) of having a fixed bundlesequence, and use methods: to call the different bundles. --Diego On Feb 24, 2012, at 12:29 AM, Aleksey Tsalolikhin wrote: > H

Re: allowconnects matching clarification needed

2012-02-18 Thread Diego Zamboni
Hi Abid, The allowconnects, allowallconnects, admit, trustkeysfrom, and skipverify attributes all accept both CIDR notation and regular expressions, and will do the correct thing. --Diego On Feb 17, 2012, at 6:32 AM, Abid Khwaja wrote: > Today I begin the conversion of our CF2 environment to

Re: CFEngine Help: New Book on Cfengine

2012-02-08 Thread Diego Zamboni
I agree this would make it more general. The book is in final draft form now, so I can't make any promises, but I'll see what I can do to incorporate this. If not, it can always be included in the next release of the book :) --Diego On Feb 8, 2012, at 8:22 AM, Nick Anderson wrote: > On 02/08

Re: CFEngine Help: New Book on Cfengine

2012-02-08 Thread Diego Zamboni
Bronto, Thanks for the nice words. The book is in final review at the moment and about to enter final production phase. I think the final version should be out around mid-march (maybe sooner). --Diego On Feb 8, 2012, at 7:13 AM, Marco Marongiu wrote: > Il 08/12/2011 14:36, no-re...@cfengine

Re: negating a class in policy

2012-01-04 Thread Diego Zamboni
Michael, To unconditionally undefined a class (which is what -N does) you could define it as an expression that always evaluates to false: classes: "class_to_undefine" not => "any"; To negate an existing class (not necessarily undefining it), I don't think you can do it on top of the same

Re: Ubuntu 10.04 install

2011-12-23 Thread Diego Zamboni
Pete, The cfengine3 package in the Ubuntu repositories is version 3.0.5, which is fairly old. The ability to use --bootstrap on the community edition of CFEngine first appeared in 3.2.0, the current version is 3.2.3. If you don't want to compile from source (which is very easy to do), I would

Re: CFEngine Help: Re: CFEngine Help: New Book on Cfengine

2011-12-08 Thread Diego Zamboni
Hi Nico, Great! I look forward to your feedback. Since the purpose of the book is precisely to be an introduction to CFEngine, I am really interested in your opinion of it as learning material for you team. --Diego On Dec 8, 2011, at 8:53 AM, Nicolas Charles wrote: > On 08/12/2011 14:36, n

Re: cannot use cfengine3 mode in Emacs 23

2011-11-26 Thread Diego Zamboni
3.3), with some additional packages. Your cfengine mode now works beautifully. Cheers, --Diego On Nov 26, 2011, at 9:02 PM, Ted Zlatanov wrote: > On Fri, 25 Nov 2011 09:34:43 -0600 Diego Zamboni wrote: > > DZ> Thanks. With the new version, I now get the following message, and syn

Re: cannot use cfengine3 mode in Emacs 23

2011-11-25 Thread Diego Zamboni
Hi Ted, Thanks. With the new version, I now get the following message, and syntax highlighting doesn't work: set: Symbol's function definition is void: syntax-propertize-rules This is on Carbon Emacs on OSX, which is Emacs 22.3.1. Thanks, --Diego On Nov 25, 2011, at 7:26 AM, Ted Zlatanov wrot

Re: CFEngine Help: Re: "real" templates

2011-11-02 Thread Diego Zamboni
Hi Marco, Could you post your current policy or a representative, standalone sample, so we can take a look at it? It seems to me the variable issues may have to do with the names you are using, since the bundles in which the variables are defined may have changed with the restructuring. --Dieg

Re: insert_lines content is in reverse order?

2011-09-21 Thread Diego Zamboni
Also, you may want to use empty_file => "true" in the files: promise instead of the delete_lines promises. Probably the same effect but more elegant. --Diego On Sep 21, 2011, at 3:15 PM, Seva Gluschenko wrote: > seems like location => start overrides preserve_block somehow. Of > course, it s

Re: Security Tools and Root Access

2011-08-13 Thread Diego Zamboni
I did :) >> and then give sudo access to certain people *only* to that program --Diego On Aug 13, 2011, at 10:00 AM, "Daniel V. Klein" wrote: > > On Aug 13, 2011, at 9:38 AM, Diego Zamboni wrote: > >> Hi Tom, >> >>> 1) Are you aware of a w

Re: Security Tools and Root Access

2011-08-13 Thread Diego Zamboni
Hi Tom, > 1) Are you aware of a wrapper, unique shell or simiar tool that could provide > root level access at a read only level? What comes to mind is to put the read-only functionality you want in a specific program, and then give sudo access to certain people *only* to that program. As long

Re: Emacs cfengine3 mode?

2011-06-20 Thread Diego Zamboni
On 6/16/2011 9:59 AM, Ted Zlatanov wrote: The cfengine mode that ships with GNU Emacs (written by Dave Love) works OK, but is not aware of the many new cfengine3 keywords. Indentation is a bit off, as well, in some sections. Noticing the same, I modified the one that comes with Emacs to add som

Re: How to check out cfengine source?

2011-01-16 Thread Diego Zamboni
The three commands are trying to check out into the same directory "trunk". You need to add the directory name at the end to have them check out into different directories. For example: enterprise$ svn checkout http://source.cfengine.com/svn/core/trunk core enterprise$ svn checkout http://source

Re: what does ${...} mean?

2010-12-12 Thread Diego Zamboni
Aleksey, They are the same. Both $(...) and ${...} can be used to refer to scalar variables, and to do implicit looping. --Diego On 12/13/2010 12:20 AM, Aleksey Tsalolikhin wrote: > Hi. What does ${...} mean again? And what's the difference to $(...) > which I know is used to unambiguously r

Re: Cfengine Help: Re: I've created a github cfengine site for sharing configs.

2010-12-06 Thread Diego Zamboni
is an opportunity for us to contribute real >>> value to each other. Getting it right requires the right medium and, most >>> importantly, a concerted effort. >>> >>> Aleksey, I think GitHub would be a fine choice for us and appreciate your >>> e

Re: Cfengine Help: Re: Extended solutions guide and YOUR HELP!

2010-11-30 Thread Diego Zamboni
Howdy, I really like the idea of using github. I am a big github fan, and have proposed before that the COPBL would benefit from being hosted on github, since it would make it easier for people to fork and send patches (I still haven't gotten around to submitting my own COPBL extensions throug

Re: 3.0.5p1: library.cf conflicts with cfengine_stdlib.cf. Trouble getting started.

2010-09-20 Thread Diego Zamboni
Aleksey, It could be that the RPM package you installed contained a custom library.cf, which contained some things from cfengine_stdlib.cf plus some additional definitions (which are now missing since you removed library.cf). I guess you could try copying the missing definitions (e.g. def(),

Re: Cfengine Help: Who's going to promise this - Forums Fubar

2010-09-01 Thread Diego Zamboni
> CFengine needs a promise that receives email replys to forum postings and > puts them into the proper subject. > > why bother contributing to "no-reply"? > As far as I can tell (and this message is a test, I'm replying by email), if you reply to help-cfengine@cfengine.org it will incorporate

action_policy => "warn" ignored?

2010-08-31 Thread Diego Zamboni
Hi, I think I'm misunderstanding how action_policy => "warn" is supposed to work. Consider the following example: bundle agent test { files: "/foo/." create => "true", action => warn_only; } body action warn_only { action_policy => "warn"; } When I run this, the directory is crea

Re: Article on the Configuration Management Summit 2010 now online at www.linux-mag.com

2010-08-25 Thread Diego Zamboni
Aleksey, > http://www.linux-mag.com/id/7841 "The State of Open Source System > Automation" > > A report on bcfg2, cfengine, chef and puppet by, > > Yours truly, > Aleksey Good article - I'm about halfway through it, and was about to send it to the list. Good thing the author beat me to it :-)

COPBL contributions? Also, hosting it on GitHub

2010-08-24 Thread Diego Zamboni
Hi cfengine guys, The COPBL page states: This library will be moderated by Cfengine, and contributions and discussions ca n be made to the help-cfengine@cfengine.org mailing list. I was wondering what the process is. Should one just email suggested additions/changes to the list? Have you gi

Setting a variable conditionally, depending on a class?

2010-04-06 Thread Diego Zamboni
Hi, Using cfengine community 3.0.4, I am trying to determine which network interface in a system matches a certain IP address pattern, and assign its name to a variable. So far, I am able to display the name of the matching interface, but can't figure out how to assign it to a variable. Please se

Re: How to replace hosts that change in the /etc/hosts file

2010-03-17 Thread Diego Zamboni
in the file of the form # LHS RHS # If the line is commented out with #, it gets uncommented first # Adds a new line if non exists. # The argument is an associative array containint v[LHS]="rhs" # Based on set_variable_values from cfengine_stdlib.cf, modified # by Diego Zamboni to use wh

Re: regcmp help

2010-02-17 Thread Diego Zamboni
Howdy, PCRE allows you to set the /s flag using (?s) at the beginning of the regex: PCRE_DOTALL If this bit is set, a dot metacharater in the pattern matches all char- acters, including those that indicate newline. Without it, a dot does not match when the current

Setting maximum number of fields for edit_field?

2010-02-05 Thread Diego Zamboni
# Based on set_variable_values from cfengine_stdlib.cf, modified # by Diego Zamboni to use whitespace as separator, and to handle # commented-out lines. bundle edit_line set_config_values(v) { vars: "index" slist => getindices("$(v)"); # Be careful if the index string contains fu

Re: default argument in body?

2010-02-05 Thread Diego Zamboni
++ for this idea. It would be very nice, and reduce duplication of bundles in which the only difference is one parameter (for example, I'm thinking of bundles for managing configuration files, some of which use "var=value", others "var value" or "var:value", etc.) --Diego On Thu, Feb 4, 2010 at 2

How to get all the values of an array?

2010-01-29 Thread Diego Zamboni
Hi, Sorry for the possibly dense question, but how do I get a list containing all the values of an associative array? I know the getindices() function, but I can't find a similar getvalues() one. My use case is that I have something like this: # Files to edit "files[sysctlconf]" string => "/

Re: Proper way of doing replace_or_add?

2010-01-29 Thread Diego Zamboni
ttern that was not found. If the pattern was not found, then the promise is > considered > to be kept. > > See new version in SVN. > > Diego Zamboni wrote: >> Hi, >> >> I am still banging my head on this. For a brief moment I thought the >> problem would b

Re: Proper way of doing replace_or_add?

2010-01-28 Thread Diego Zamboni
t;; occurrences => "all"; } body classes always(x) { promise_repaired => { "$(x)" }; promise_kept => { "$(x)" }; repair_failed => { "$(x)" }; repair_denied => { "$(x)" }; repair_timeout => { "$(x)" }; } On Tue, Jan 26, 201

Re: How to avoid spurious connection failure messages, when some other server responds?

2010-01-26 Thread Diego Zamboni
nate the error messages - I don't care why one of the servers doesn't respond (for this particular case), as long as one of them responds. Thanks for any help, --Diego On Tue, Jan 26, 2010 at 2:42 PM, Mark wrote: > If you are getting no route to host then the problem is with your netwo

Re: Proper way of doing replace_or_add?

2010-01-26 Thread Diego Zamboni
t;> cf3    Skipping whole next edit promise, as context replace_done is not >> relevant >> cf3    .  .  .  .  .  .  .  .  .  .  .  .  .  .  . >> >> >> On Tue, Jan 26, 2010 at 8:35 AM, Mark Burgess >> wrote: >>> >>> IN this case, you ne

How to avoid spurious connection failure messages, when some other server responds?

2010-01-26 Thread Diego Zamboni
Hi, In my update promises, I have multiple policy hosts defined – in my particular test setup, if the remote server is not available, I connect to localhost, where a server is also running (it’s all just for testing for now). However, when the update runs, I still get the connection failure messa

Proper way of doing replace_or_add?

2010-01-25 Thread Diego Zamboni
Hi, I've been working on putting together an edit_line bundle that does the following: - If a certain pattern exists, replace it with a given string - If the pattern does not exist, add the line to the file. Below is what I came up with, which works, but somehow feels inelegant because I have to

Re: Checking for file existence using a pattern?

2010-01-21 Thread Diego Zamboni
make example self-contained body classes if_ok(x) { promise_repaired => { "$(x)" }; promise_kept => { "$(x)" }; } On Thu, Jan 21, 2010 at 10:30 AM, Diego Zamboni wrote: > Hi, > > I have a script that produces an output file with a known file pattern, but &

Checking for file existence using a pattern?

2010-01-21 Thread Diego Zamboni
Hi, I have a script that produces an output file with a known file pattern, but the precise output filename is not predictable. I would like to ensure the output file is there, and if not run the script to produce it. Unfortunately, it seems that neither fileexists() nor file promises allow me

Re: package_file_repositories functionality not implemented?

2010-01-14 Thread Diego Zamboni
> Yast is a waste of space, but zypper is pretty good since version 11.1 > It can handle local media or remote repositories. > > Diego Zamboni wrote: >> Hi Mark, >> >> On Wed, Jan 13, 2010 at 8:49 PM, Mark wrote: >>> You are correct. This never got implemented

Re: package_file_repositories functionality not implemented?

2010-01-14 Thread Diego Zamboni
Hi Mark, On Wed, Jan 13, 2010 at 8:49 PM, Mark wrote: > You are correct. This never got implemented as everyone seems to be using > yum or some such repos these days. We can come cack to this in the next > weeks. Thanks for the reply. I am wondering now what do people use to manage software usin

package_file_repositories functionality not implemented?

2010-01-13 Thread Diego Zamboni
Hi, Just getting started with cfengine. I am trying to verify that a certain package is installed (rpm on a SLES9 system), and if it’s not, install it from an rpm file stored in /usr/src/packages/RPMS. From my understanding of the documentation, package_file_repositories in the package_method body