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

2012-09-11 Thread Gregory Matthews
On 11/09/12 15:51, no-re...@cfengine.com wrote: > > Implicit iteration over non-local variables was added in 3.3.0. > > https://github.com/cfengine/core/blob/3.3.x/ChangeLog well, that is pretty clear. Thanks for everyones input, I have a workaround in place until we can upgrade. We are migrating

Re: iterating over a global list

2012-09-11 Thread Gregory Matthews
defined? G > > bundle common g > { > vars: > ... > } > > Meanwhile, there's no need to include common bundles into the bundlesequence. > > -- > Best, > Seva > > 2012/9/11 Gregory Matthews: >> what is wrong here? >> >> body

iterating over a global list

2012-09-11 Thread Gregory Matthews
what is wrong here? body common control { bundlesequence => { "g", "test" }; inputs => { "cfengine_stdlib.cf" }; } bundle agent g { vars: "list" slist => { "1", "2", "3" }; } bundle agent test { reports: "debug: $(g.list)"; } results in: R: debug list: $(g.list) defining the list lo

Re: indentation and insert_lines

2012-09-04 Thread Gregory Matthews
> from the template. > > --Diego > > On Sep 3, 2012, at 3:37 PM, Nick 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

Re: indentation and insert_lines

2012-09-03 Thread Gregory Matthews
eate => "true", edit_defaults => empty, # this works edit_line => insert_lines(@(test.eth00)), comment => "some comment", classes => if_repaired("some_class"); } In other words, you /have/ to define the list as a v

Re: indentation and insert_lines

2012-09-03 Thread Gregory Matthews
G 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. > > --Diego > > On Aug 31,

indentation and insert_lines

2012-08-31 Thread Gregory Matthews
how do ppl reconcile indentation for readability in .cf files with the needs to insert lines that are not indented? for example: g_dnsserver.my_serv_name:: "/etc/sysconfig/network-scripts/ifcfg-eth0-range0" create => "true", edit_defaults => empty, edit_line

Re: bundles with the same name

2012-05-11 Thread Gregory Matthews
On 11/05/12 15:14, Aleksey Tsalolikhin wrote: > Is it ever confusing to have two people with the same name? Or two > anything with the > same name? :) Same thing with bundles... except when you need a caffeine boost and you say "Mike, get me a coffee" I don't care which Mike brings my coffee

Re: bundles with the same name

2012-05-10 Thread Gregory Matthews
On 09/05/12 15:26, Nick Anderson wrote: > I think you could end up getting some unexpected results if you do that. > > If you are referencing a fully qualified variable which one will you get? > > My tests show it will vary based on what was defined first. Things could > get really confusing. It al

bundles with the same name

2012-05-09 Thread Gregory Matthews
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? GREG -- Greg Matthews01235 778658 Scientific Computing Group Leader Diamond Light