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

2012-04-30 Thread Nick Anderson
ince I need to edit multiple files. Can you break your policy into groups and achieve similar? Even without going to the host specific level? I am interested in what you are doing now. And I think some mechanism to obfuscate the policy from a casual browser could be a useful option. -- Nick Ande

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

2012-04-30 Thread Nick Anderson
policy. Arguably thats the real desire. I see value in the option to have an extra roadblock for peering into policy that sits on the host. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: the need for cf-serverd on CF3 clients

2012-04-30 Thread Nick Anderson
x27;t open bind an > open socket > Apr 30 11:47:41 client01 user:notice cf3[581692]: I: Last 3 quoted lines > were generated by promiser ""/var/opt/TWWfsw/cfengine323/bin/cf-serverd"" I would need to see your policy for the specifics of those errors. That looks like the

edit_template variable expansion

2012-04-30 Thread Nick Anderson
all of the variables in the documentation examples are referenced globally but I did not see any notes that mentioned it is specifically required. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman

Re: CFEngine Help: Multple (identical) command executions optimized away?

2012-05-01 Thread Nick Anderson
atical form diagram. https://cfengine.com/manuals/cf3-Reference#Rules-are-promises The promiser and all of the attributes combined comprise a complete promise. At least thats my understanding, but I have been wrong before :) -- Nick Anderson ___ Help

CFEngine Help: Re: CFEngine Help: Multple (identical) command executions optimized away?

2012-05-01 Thread Nick Anderson
enth cf3> . cf3> cf3> -> Executing '/bin/true' ...(timeout=-678,owner=-1,group=-1) cf3> -> (Setting umask to 77) cf3> -> Finished command related to promiser "/bin/true" -- succeeded cf3>

Distill a three dimensional array to a two dimensional array?

2012-05-01 Thread Nick Anderson
service_acl("service_main.acl_conf"); } bundle service_acl(params){ configure the acls as defined } I definitely don't have to do it this way, but being able to wrap up multiple smaller reusable components and present them as a single interface seems useful. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: [ANNOUNCE] CFEngine Community 3.3.1 is released

2012-05-04 Thread Nick Anderson
On 05/04/2012 06:48 AM, Mikhail Gusarov wrote: > Good day, > > CFEngine Community 3.3.1 is now available for download. > > This is a bugfix release. Great, thanks no tag in github for the changelog? ___ Help-cfengine mailing list Help-cfengine@cfengine.

Re: bundles with the same name

2012-05-09 Thread Nick Anderson
On 05/09/2012 08:19 AM, Gregory Matthews wrote: > Is it bad practice to have bundles with the same name? e.g. > > bundle common g { > ... > } > > bundle agent g { > ... > } > > it provides some convenience for us and appears to work but am I storing > up trouble for myself? I think you could end u

Re: bundles with the same name

2012-05-11 Thread Nick Anderson
On 05/11/2012 09:39 AM, Gregory Matthews wrote: > except when you need a caffeine boost and you say "Mike, get me a coffee" > > I don't care which Mike brings my coffee ;) Something like commands: mike:: "/usr/bin/wget coffee" action => "immediate";

Segfault when reporting on array

2012-05-15 Thread Nick Anderson
I am running 3.3.1 on ubuntu 64bit just randomly stumbled on this while working on some policy. Policy to reproduce posted in this gist https://gist.github.com/2706930 Its the last report listed that appears to cause it. Can anyone else reproduce? __

Re: Segfault when reporting on array

2012-05-16 Thread Nick Anderson
On 05/16/2012 02:08 AM, Bas van der Vlies wrote: > 09:08 gb-r11n7.irc.sara.nl:/var/tmp/bas/2706930 > root# cf-agent -KI ./test_groups.cf > Unexpected argument with no preceding option: ./test_groups.cf > Fatal CFEngine error: Aborted > > no segv > -- Try it with cf-agent -KIf ./test_groups.cf

Re: CFEngine Help: git promises

2012-05-16 Thread Nick Anderson
On 05/16/2012 01:50 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: git promises > Author: analogue > Link to topic: https://cfengine.com/forum/read.php?3,25954,25954#msg-25954 > > Hi, > > I'm looking for some bundle that would allow me to write promises for some > git cloned re

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

2012-05-16 Thread Nick Anderson
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"); > } What happens if some cowboy came in and manually twiddled an

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

2012-05-17 Thread Nick Anderson
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. That would be cool. It seems to be a pattern I do a lot with svn. And now I have a way to do it with git. Threw this together https://gist.github.

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

2012-05-17 Thread Nick Anderson
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 support for VCS pulls, like it >>> has for package manageme

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

2012-05-17 Thread Nick Anderson
On 05/17/2012 12:40 PM, Ted Zlatanov wrote: > 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: &

Re: CFEngine Help: Make CFEngine update itself

2012-05-17 Thread Nick Anderson
On 05/17/2012 03:05 PM, no-re...@cfengine.com wrote: > # cf-promises > cf-promises: symbol lookup error: cf-promises: undefined symbol: > GOALCATEGORIES > > > Restarting cfengine (/etc/init.d/cfengine3 restart) does not help. > > But waiting helps: After 15 minutes, the error is not displayed any

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

2012-05-17 Thread Nick Anderson
On 05/17/2012 01:14 PM, Ted Zlatanov wrote: > 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 Hey Analogue, I submitted a pull request to the design-center earlier

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

2012-05-21 Thread Nick Anderson
Ted Zlatanov wrote: >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 >imp

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

2012-05-22 Thread Nick Anderson
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. I tried to use it manually and none of the variables seem to expand. I have not tried with cfsketch yet. looks like all the [] a

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 02:23 PM, Ted Zlatanov wrote: > You want "prefixVAR" instead of "prefix[VAR]". In other words, we're > passing a namespace prefix, not an array name, so all your variables are > named "main.repoVAR" (assuming you pass the prefix like that, although I > think "main.repo_" would be a m

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

2012-05-22 Thread Nick Anderson
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. Works for me. > NA> # TODO: provide some way to selectivly contain the executing user > > Yeah, good point. Th

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 04:03 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Replace underscores in interface names (creating routes) > Author: alan.hatch > Link to topic: https://cfengine.com/forum/read.php?3,26010,26010#msg-26010 > > We are using interface aliases with periods that are

Variable setting in verbose output

2012-05-22 Thread Nick Anderson
I am curious why verbose output does not show variables getting assigned. Should this just be a feature request? ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Variable setting in verbose output

2012-05-22 Thread Nick Anderson
On 05/22/2012 07:57 PM, Neil Watson wrote: > I have a similar request below. Feel free to add your two cents. > > https://cfengine.com/bugtracker/view.php?id=983 > great, thanks ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 08:26 PM, Ted Zlatanov wrote: > Hmm. Can cfengine find out the current UID? If not, the default will > be hard to do, unless I use two contain bodies, one with and one without > the user specified. > > I can't find such getuid() functionality in the manual. It doesn't make > sense

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 08:33 PM, Nick Anderson wrote: > On 05/22/2012 08:26 PM, Ted Zlatanov wrote: >> Hmm. Can cfengine find out the current UID? If not, the default will >> be hard to do, unless I use two contain bodies, one with and one without >> the user specified. >>

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 08:35 PM, Nick Anderson wrote: > The next thing is two seperate command promises, one with a container, > one without classed on the presance of a variable being defined. Or what about accessing env USER ___ Help-cfengine mailing lis

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

2012-05-22 Thread Nick Anderson
On 05/22/2012 08:39 PM, Nick Anderson wrote: > Or what about accessing env USER https://cfengine.com/manuals/cf3-Reference#Function-getenv ___ 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-22 Thread Nick Anderson
On 05/22/2012 08:41 PM, Nick Anderson wrote: > https://cfengine.com/manuals/cf3-Reference#Function-getenv So env contains USER, and with that we can get gid. "user" string => getenv("USER","20"); "no" int => getfields("$(user

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

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: 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

Zenoss integration

2012-05-31 Thread Nick Anderson
Is the zenoss integration only for Nova and greater edition? https://cfengine.com/manuals/cf3-Reference#export_005fzenoss-in-hub History: Was introduced in version 3.1.0b1,Nova 2.0.0b1 (2010) makes me think its available in community 3.1.0b1 and greater. I added a body hub control to my promises

Commands and environment variables

2012-06-01 Thread Nick Anderson
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 useshell would get me that users normal env but when I run "/usr/bin/env" contain => setuid_sh("$(user)"); I get roots env dumped Q: "...sr

Re: Commands and environment variables

2012-06-01 Thread Nick Anderson
Diego Zamboni wrote: >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 c

Re: Has anybody put together a body package_method cpan ?

2012-06-05 Thread Nick Anderson
On 06/05/2012 02:31 PM, Neil Watson wrote: > Well, there is your problem. Clearly you should have used camel and not > a goat. Wait, lambs have fallen out of favor? ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/l

Can't Bootstrap to localhost

2012-06-07 Thread Nick Anderson
This is a continuation of a discussion on twitter 140 characters just isn't enough for this conversation :) Quick History, Nick Silkey was trying to setup a new temporal hub against localhost. Guessing he was running cf-agent -B -s 127.0.01 or cf-agent -B -s localhost. Its known behavior. https

Re: Problems editing /etc/exports

2012-06-08 Thread Nick Anderson
On 06/08/2012 06:35 PM, Ron Parker wrote: > Giving up for the night, I'll check back here in the morning. Hey Ron, can you post a self contained example? ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/hel

Re: Zenoss integration

2012-06-08 Thread Nick Anderson
On 05/31/2012 03:09 PM, Nick Anderson wrote: > Is the zenoss integration only for Nova and greater edition? > > https://cfengine.com/manuals/cf3-Reference#export_005fzenoss-in-hub > History: Was introduced in version 3.1.0b1,Nova 2.0.0b1 (2010) > > makes me think its available in

Re: CFEngine Help: Re: cfengine3.3.3 binaries no longer install in /usr/local/sbin

2012-06-13 Thread Nick Anderson
no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Re: cfengine3.3.3 binaries no longer install in >/usr/local/sbin >Author: timw077 >Link to topic: >https://cfengine.com/forum/read.php?3,26176,26199#msg-26199 > >This is a bug. It is not in the change log, and the examples still >point

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
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> force update of `masterfiles/cf_promises_validated` ? > >Would it work to just say "cf-promises ... && touch >masterfiles/cf_promises

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
On 06/21/2012 08:07 AM, Riccardo Murri wrote: > Hi Ted, > "cf_promises_validated" seems to contain the date of the last > successful validation, so maybe this one instead? I was under the impression that it worked like this. When policy has changed and then been successfully validated /var/cfeng

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
On 06/21/2012 08:21 AM, Ted Zlatanov wrote: > I don't know if the timestamp is necessary, sorry. Try it with the > timestamp and without it:) > > I would have used UTC in an ISO string with the timezone, or simply an > epoch timestamp. But that's all academic if the file contents don't > matter.

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

2012-06-22 Thread Nick Anderson
no-re...@cfengine.com wrote: >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 > >Hello, > >I try to used a string list variable in the inpu

Re: array of lists expansion

2012-06-25 Thread Nick Anderson
On 06/25/2012 09:10 AM, Marco Marongiu wrote: > Hi all > > OK, I admit this must be *dumb*, but I cannot get out of this... > > Suppose I have an array of lists: > > "array[key1]" slist => { ... } ; > "array[key2]" slist => { ... } ; > . . . > "array[keyN]" slist => { ... } ; > > > and suppose that

Re: array of lists expansion

2012-06-25 Thread Nick Anderson
Here it is inline for the archives. body common control { bundlesequence => { "main", }; inputs => { "cfengine_stdlib.cf", }; } bundle agent main { vars: "array[key1]" slist => {"array1_key1_item1", "array1_key1_item2"}; "array[key2]" slist => {"array1_key2_item1", "array1_key2_item2

Re: array of lists expansion

2012-06-25 Thread Nick Anderson
On 06/25/2012 12:50 PM, Marco Marongiu wrote: > Summing up, the right way to expand a slist contained in an array > element is actually: > > "list" slist => { "@(array[$(selector)])" } ; > > However, if you plan to use list as a parameter for a bundle, you'd > better prefix the list expansion with

In case you didn’t see: CFEngine support for Vagrant is DONE

2012-06-26 Thread Nick Anderson
‏@mitchellh About to step on stage for #VelocityConf, but I have exciting news: CFEngine support for Vagrant is DONE. Plugin for 1.0, core for 1.1. @mitchellh @cmdln_ I'll be meeting with the CFengine folks who worked on this on Thursday to bring it in. :) ___

Re: CFEngine Help: Re: cf_promises_validated and $(master_location)

2012-06-26 Thread Nick Anderson
On 06/26/2012 03:04 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: cf_promises_validated and $(master_location) > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,26327,26328#msg-26328 > > /var/cfengine/masterfiles/cf_promises_validated is hard code

Vagrant Project on Github

2012-07-05 Thread Nick Anderson
I have a Vagrant project on github, its supposed to make it easy for you to get a CFEngine hub and client up for testing, would like to add exercises to help people get used to CFEngine. give it a shot git clone https://github.com/nickanderson/CFEngine-3-by-example-vagrant cd CFEngine-3-by-exam

Vagrant Project on Github

2012-07-05 Thread Nick Anderson
On 07/05/2012 10:12 AM, Nick Anderson wrote: > I have a Vagrant project on github, its supposed to make it easy for you > to get a CFEngine hub and client up for testing, would like to add > exercises to help people get used to CFEngine. > > give it a shot > git clone

Vagrant Project on Github

2012-07-05 Thread Nick Anderson
On 07/05/2012 10:13 AM, Nick Anderson wrote: > That clone was wrong > try git clone > git://github.com/nickanderson/CFEngine-3-by-example-vagrant.git I am just not paying attention this morning. You need to make sure that it can download the seed.tar.gz via http, take a look at the Va

Re: Vagrant Project on Github

2012-07-05 Thread Nick Anderson
On 07/05/2012 01:24 PM, Diego Zamboni wrote: > Excellent, Nick, thank you for putting this together. > > Coming up in the Vagrant CFEngine provisioner: installation and configuration > of Design Center sketches :) Oh neat. ___ Help-cfengine mailing li

CFEngine 3 by example vagrant project updated

2012-07-14 Thread Nick Anderson
Masterfiles on the hub now starts out as a git clone (mirrored with VCS::vcs_mirror) against a bare repository so you can start with a typical work-flow. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/hel

Re: IPv4 addresses for tun0 not showing?

2012-07-19 Thread Nick Anderson
On 07/19/2012 12:07 PM, Marco Marongiu wrote: > Anyone? > > Should I go for a module? Looks like you will have to. Btw there is a sketch in the dc to use bundle if ip has mac. Might work for what your doing. I've used for similar. ___ Help-cfengine maili

Re: CFEngine Help: Re: delete_lines and select region

2012-07-20 Thread Nick Anderson
On 07/20/2012 12:54 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: delete_lines and select region > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,26551,26560#msg-26560 > > You might also consider a different approach. My best practice is to avoi

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

2012-07-25 Thread Nick Anderson
On 07/25/2012 09:32 AM, Ted Zlatanov wrote: > But you > can try something likehttps://github.com/tzz/jim and grab the module > output. Let me know if you want to know how to use that tool. I would like to see more about it. ___ Help-cfengine mailing

Re: CFEngine Help: How-to restart machine after certain package have been installed.

2012-07-26 Thread Nick Anderson
Is it in fact installing the package you want? At a cusery glance I think you might want addupdate for the package policy. -- Sent from Kaiten Mail for Android. Please excuse my brevity. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https:/

Re: CFEngine Help: Re: CFEngine Help: How-to restart machine after certain package have been installed.

2012-07-26 Thread Nick Anderson
no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Re: CFEngine Help: How-to restart machine after certain >package have been installed. >Author: juriskrumins >Link to topic: >https://cfengine.com/forum/read.php?3,26673,26716#msg-26716 > >Hi Nick. Great analisys. Take a look what I've go

Re: CFEngine Help: Suggestions needed on folder structure and paths in promises

2012-07-30 Thread Nick Anderson
On 07/30/2012 01:50 AM, Tokarski Boleslaw wrote: > I am sure you can find a particular JDK version pre-packaged, I don't > know about maven. You can also checkout fpm https://github.com/jordansissel/fpm/ to help you with building custom packges. ___ Hel

Variable convergence mystery

2012-07-31 Thread Nick Anderson
I saw something I didn't expect last night. Ted cleaned up a sketch for managing /etc/security/limits.conf that worked like this example. The file making the promise $(filename) gets set to different values based on a class. I thought due to normal ordering, on the first pass filename should ge

Re: Variable convergence mystery

2012-07-31 Thread Nick Anderson
On 07/31/2012 09:32 AM, Ted Zlatanov wrote: > Thinking about it, I think the key is that !debug requires knowledge of > the debug context, so it needs the context expression to converge. At > least that was my instinctive thinking when I wrote the above. But I > don't know the specific algorithm

Re: Variable convergence mystery

2012-07-31 Thread Nick Anderson
On 07/31/2012 10:18 AM, Tokarski Boleslaw wrote: > Normal ordering specifies that vars are run before classes. So before > anything else happens below this, debug is not declared, so "filename" > is set to "/tmp/nodebug". > > Then, the class debug is declared, on the second CFEngine iteration this

Re: Variable convergence mystery

2012-07-31 Thread Nick Anderson
On 07/31/2012 12:14 PM, Diego Zamboni wrote: > 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

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

2012-08-01 Thread Nick Anderson
On 08/01/2012 05:00 AM, no-re...@cfengine.com wrote: > To make some promise, I need to define classes like this : > - XXX_running > - XXX_stopped Sometimes, it is helpful to take a step back and think about things from a different perspective. I know this is not a direct answer to your question,

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

2012-08-02 Thread Nick Anderson
On 08/02/2012 08:08 AM, Ted Zlatanov wrote: > Think, instead, in terms of convergence. So your class name should > indicate the convergent action, not the system state. When you name the > class "rhsmcertd_needs_start", that indicates clearly, to a reader, what > you're going to use it for. The

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

2012-08-02 Thread Nick Anderson
On 08/02/2012 08:17 AM, Nick Anderson wrote: > Basically the promisee has not promised anything, so its ok. > If you add a process_count attribute to that promise body I think you > might start seeing the behaviour you were expecting or looking for. Here is an example. body commo

Body file control inputs?

2012-08-07 Thread Nick Anderson
Has any thought been given to adding inputs from places other than body common control? -- Sent from a mobile device. Please excuse my brevity. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengin

Problems with manage_variable_values_ini from copbl

2012-08-23 Thread Nick Anderson
I am getting errors that the promised line insertion could not select an edit region in the file. The only difference between manage_variable_values_ini and set_variable_values_ini is that manage_variable_values_ini contains a delete_lines promise to remove everything inside of the section bef

Re: Problems with manage_variable_values_ini from copbl

2012-08-24 Thread Nick Anderson
So it seems like select region is not detecting the end of the file as region end. I get the same error when using set_variable_values_ini if there is no INI section after the one promised. If I add in a dummy section after the promised section both manage and set_variable_values_ini seem to s

Re: Problems with manage_variable_values_ini from copbl

2012-08-24 Thread Nick Anderson
I have made some changes to manage_variable_values to remove errors, but it's still taking two activations to converge :/ Any ideas on getting it to converge in a single activation? Note: these changes only suppress warnings about now being able to select an edit region, it was taking two activ

Re: CFEngine Help: Normal ordering, files and commands

2012-08-29 Thread Nick Anderson
My guess is that the files promises have already been "kept" on the first pass, they are not corrected on second or third pass because they have already been verified. If you give us your verbose output it would help. Is it not corrected on a subsequent activation? That would surprise me.

Re: CFEngine Help: Bind serial number

2012-09-01 Thread Nick Anderson
no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Bind serial number >Author: paco699 >Link to topic: >https://cfengine.com/forum/read.php?3,27164,27164#msg-27164 > >Hello @ll, > >I have a problem of incrementation of serial number of my zones for >bind. >Indeed, cfengine don't incremen

Re: CFEngine Help: Policy distribution

2012-09-01 Thread Nick Anderson
no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Policy distribution >Author: mpr >Link to topic: >https://cfengine.com/forum/read.php?3,27167,27167#msg-27167 > >Currently our policy is kept in git and distributed using cf-serverd. >Since we already have public/private key authenticati

Re: indentation and insert_lines

2012-09-03 Thread Nick Anderson
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 be indented. Just separate them by commas in your code, should work fine. undle agent test {

Raise a class when class thing1 but not class thing2

2012-09-07 Thread Nick Anderson
https://gist.github.com/3667439 I am having issues getting a class to raise when one class is present and another is not. It must be something simple I am overlooking. The area in question is around the redfish class in this example. I expect to be able to set cat_tail to something other than t

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

2012-09-07 Thread Nick Anderson
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 class thing2 Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,27246,27247#msg-27247 Nick, Did you check the verbose agent output to see what cla

Overriding/setting array variables with a list

2012-09-09 Thread Nick Anderson
Is it expected behavior that you cannot create new index values with a list? If I do a simple array creation with a list it seems to work https://gist.github.com/3684884 (set_array_values_with_list.cf) cf-agent -KIf ./set_array_values_with_list.cf R: Array: local_array[id1]=value R: Array: local

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

2012-09-10 Thread Nick Anderson
On 09/10/2012 01:16 AM, Diego Zamboni wrote: > Hi Nick, > > I haven't fully worked through the reason, but I'm pretty sure the problem > lies with the not(), because the not() function returns a string, which is > then being classify-ed - so the "!" inserted by the not() would be lost. > > Attach

Re: Overriding/setting array variables with a list

2012-09-10 Thread Nick Anderson
On 09/09/2012 10:22 PM, Diego Zamboni wrote: > 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:: >

Re: CFEngine Help: Re: iterating over a global list

2012-09-11 Thread Nick Anderson
On 09/11/2012 08:57 AM, no-re...@cfengine.com wrote: > The version mentioned, 3.2.1, is pretty old. You might consider an upgrade. > I am not certain that iteration over foriegn lists will work. Typical > practice is to make it local then iterate over that. > var: >'local_list' slist => {

Re: CFEngine Help: Policy distribution

2012-09-13 Thread Nick Anderson
On 09/13/2012 02:38 PM, Ted Zlatanov wrote: > As Nick mentioned, VCS::vcs_mirror in Design Center addresses this. There is a git_failsafe.cf or something similar in contrib that Ted has been working on. I haven't tried it out. I have just inlined the vcs_mirror sketch to failsafe.cf manually.

rpm_version package provider

2012-09-18 Thread Nick Anderson
I dont understand why CFEngine is detecting this package as up to date. I am trying to update to openssh 5.9p1 with an rpm from a directory. verbose output finds the installed version of openssh and says the package is up to date. Can you see what I am missing / not understanding? Gist: https:/

Re: CFEngine Help: Re: rpm_version package provider

2012-09-18 Thread Nick Anderson
On 09/18/2012 01:40 PM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: rpm_version package provider > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,27409,27410#msg-27410 > > I think that the trailing -1 might be a release rather part of the version.

Re: CFEngine Help: Re: [ANNOUNCE] CFEngine Community 3.4.0beta2 is released

2012-10-01 Thread Nick Anderson
Marco Marongiu wrote: >> Where did this come from? We already handle this using classes. Why >> add another method to muddy the waters? Changing a feature's main >> purpose from documentation to functional leaves me dumbfounded. >[...] >> We can already reorder promises using classes. What pur

Re: CFEngine Help: Re: auto-scrolling website

2012-10-01 Thread Nick Anderson
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. > > 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 > KeySear

Re: CFEngine Help: Re: auto-scrolling website

2012-10-01 Thread Nick Anderson
On 10/02/2012 12:38 AM, Diego Zamboni wrote: > I knew I had seen the instructions somewhere :) Thanks Nick for the reminder! :) In fact, you should be able to click this link http://www.searchplugins.net/pluginlist.aspx?q=CFEngine&mode=title&view= Then click the "I" link to install it ___

Re: slist inside array

2012-10-05 Thread Nick Anderson
Yeah I keep running into it too, you can pull it back out into another list and iterate as a workaround. -- Sent from Kaiten Mail for Android. Please excuse my brevity. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mail

Re: slist inside array

2012-10-06 Thread Nick Anderson
nce you were in the "sub bundle" via the method promise, >the >slist would expand into a string. > > > > >On 10/5/12 2:47 PM, "Nick Anderson" wrote: > >>Yeah I keep running into it too, you can pull it back out into another >>list and iter

<    1   2   3