Issue #448 has been updated by Luke Kanies.
And here's the doc brief I added to the commit:
You can now specify relationships directly in the language:
<pre>
File[/foo] -> Service[bar]
</pre>
Specifies a normal dependency while:
<pre>
File[/foo] ~> Service[bar]
</pre>
Specifies a subscription.
You can also do relationship chaining, specifying multiple
relationships on a single line:
<pre>
File[/foo] -> Package[baz] -> Service[bar]
</pre>
Note that while it's confusing, you don't have to have all
of the arrows be the same direction:
<pre>
File[/foo] -> Service[bar] <~ Package[baz]
</pre>
This can provide some succinctness at the cost of readability.
You can also specify full resources, rather than just
resource refs:
<pre>
file { "/foo": ensure => present } -> package { bar: ensure => installed }
</pre>
But wait! There's more! You can also specify a subscription on either side
of the relationship marker:
<pre>
yumrepo { foo: .... }
package { bar: provider => yum, ... }
Yumrepo <| |> -> Package <| provider == yum |>
</pre>
This, finally, provides easy many to many relationships in Puppet, but it also
opens
the door to massive dependency cycles. This last feature is a very powerful
stick,
and you can considerably hurt yourself with it.
----------------------------------------
Feature #448: Relationships should have their own syntax
http://projects.puppetlabs.com/issues/448
Author: Luke Kanies
Status: Ready for Testing
Priority: Normal
Assigned to: Luke Kanies
Category: language
Target version: unplanned
Patch: None
Affected version: 0.24.8
Keywords:
Branch: luke/tickets/master/448-relationship_syntax
Relationships should be a separate configuration layer, and as such should have
their own special syntax, rather than using parameters.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.