On 07/05/2011 05:51 AM, Ken Barber wrote:
Then you can also use these anonymous blocks/closures with defaults as well:
class c {
{
Service { hasstatus => true }
service { "a": }
}->
Yes, they should have their own scope, and pretty normal
puppet semantics/conventions. Mayb
Well ... then I agree with your sentiments on using classes, it can
get ugly using inner classes to achieve what you want. Something I
often find myself doing with the puppetlabs-firewall module using
inner classes to get around having to do proto => tcp and proto => udp
repeatedly:
class c {
cl
On 07/05/2011 04:35 AM, Ken Barber wrote:
Whats wrong with using chained resources?
It doesn't scale.
Try expanding this (it is a slightly improved
proposal with block{} instead of order{}):
class c {
block { "x":# any order
package { ... }
file
I wasn't aware of that layout of the syntax, that's a really interesting way
of writing it. The OP would seem to want "blocks" added to this though. This
is all very reminiscent of Stages though, so surely if there IS a solution
that satisfies the original need it would be an adjustment to stages.
Whats wrong with using chained resources?
class x {
file { "a":
} ->
exec { "b":
} ->
exec { "c":
} ->
exec { "d":
}
}
ken.
On Tue, Jul 5, 2011 at 4:40 AM, vagn scott wrote:
> Sometimes things just have to happen in sequence.
> It is the simplest of relations, but puppet really
I like it.
You could also call the class like we do with stages:
class { c: ordered => strict, stage => main }
This could influence the way block[x] -> block[y] is called.
It would make determining order and troubleshooting clearer.
Anyway, put up a feature request and I'll vote for it.
Chee
On 07/05/2011 01:57 AM, Peter Meier wrote:
Can also be:
Yes, I know. Now expand this one, and maybe you will get my point.
-
Thinking about this some more, I like block better,
with order optional:
class c {
block { "x":# any order
package {
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
This
> file { "a":
> path => " aaa ",
> before => Exec[ "b" ],
> }
>
> exec { "b":
> command => "bbb",
> before => File[ "c" ],
> }
>
> file { "c
On 07/05/2011 01:08 AM, Scott Smith wrote:
Whatever problem you are trying to solve is most likely best handled
outside of Puppet.
The problem I'm trying to solve is one of
expressiveness in the language. I'm not
adding any functionality that is not already
in puppet. I'm just suggesting ther
Whatever problem you are trying to solve is most likely best handled outside
of Puppet.
On Mon, Jul 4, 2011 at 9:59 PM, vagn scott wrote:
> Thinking about this some more, I like block better,
> with order optional:
>
> class c {
>
>block { "x":# any order
>package { .
Thinking about this some more, I like block better,
with order optional:
class c {
block { "x":# any order
package { ... }
file { "aaa": }
exec { "bbb": }
file { "ccc": }
include foo
}
blo
On 07/04/2011 11:56 PM, vagn scott wrote:
On 07/04/2011 11:51 PM, Scott Smith wrote:
Ignoring the fact that "noise" is very subjective... it doesn't. In
Puppet, position in a file has no bearing on order. It's not an
imperative language.
Oops, that should be:
file { "a":
On 07/04/2011 11:51 PM, Scott Smith wrote:
Ignoring the fact that "noise" is very subjective... it doesn't. In
Puppet, position in a file has no bearing on order. It's not an
imperative language.
I understand. What I am saying is that another way to express this
file { "a":
Ignoring the fact that "noise" is very subjective... it doesn't. In Puppet,
position in a file has no bearing on order. It's not an imperative language.
On Mon, Jul 4, 2011 at 8:46 PM, vagn scott wrote:
> On 07/04/2011 11:42 PM, Scott Smith wrote:
>
>> I take it you're not familiar with the `req
On 07/04/2011 11:42 PM, Scott Smith wrote:
I take it you're not familiar with the `requires' parameter.
I'm familiar with
requires
subscribe
notifies
->
<-
before
which are great for specifying relations between non-adjacent things.
But they are annoying to use for resourc
I take it you're not familiar with the `requires' parameter.
On Mon, Jul 4, 2011 at 8:40 PM, vagn scott wrote:
> Sometimes things just have to happen in sequence.
> It is the simplest of relations, but puppet really
> has no convenient, non-fiddly way to express it.
> So, how about
>
>
> class x
16 matches
Mail list logo