Fix #1088 - Collections overrides
This changeset defines a new syntax to override collection
of resources (virtual or not). This feature is not constrained
to the override in inherited context as usual resource
override.
The collection of resource supports a query like regular collection
of virtual or exported resources.
Usage example:
file {
"/tmp/testing": content => "whatever"
}
File<| |> {
mode => 0600
}
It also introduces a different behaviour for collection of catalog
resources. Before this patch, only virtual resources were collected,
now all resources (virtual or no) are collected and can be overriden.
That means it is now possible to do:
File <| |> { mode => 0600 }
And all the Files resources will have mode 0600.
It is then possible to have this puppet pattern:
file { "/tmp/a": content => "a" }
file { "/tmp/b": content => "b" }
File <| title != "/tmp/a" |> {
require => File["/tmp/b"]
}
which means that every File requires a file.
Moreover it is now possible to define resource overriding
without respecting the override on inheritance rule:
class a {
file { "/tmp/testing": content => "whatever" }
}
class b {
include a File<| |> { mode => 0600 }
}
include b
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>