HomePhorge

Fix #1088 - Collections overrides
b15028f55ba6Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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>

Details

Provenance
Brice Figureau <brice-puppet@daysofwonder.com>Authored on
James Turnbull <james@lovedthanlost.net>Committed on Mar 14 2009, 1:31 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb24b9f5de02f: Fixed #2071 - Updated LDAP schema
Branches
Unknown
Tags
Unknown

Event Timeline

James Turnbull <james@lovedthanlost.net> committed rPUb15028f55ba6: Fix #1088 - Collections overrides (authored by Brice Figureau <brice-puppet@daysofwonder.com>).Mar 14 2009, 1:31 AM