On Thu, Dec 8, 2016 at 7:28 AM, Trevor Vaughan <
tvau...@onyxpoint.com> wrote:
> So, in theory, ephemeral resources would only have relationships on items
> that need them for data and/or building purposes.
>
> We already have this problem and, as more items start getting managed, we're
> going to run into more issues with large catalog compile and application
> death.
>
> I guess they could be called shared_data objects or something like that.
> They would be declared the same way as resources but perhaps a metaparameter
> could be added that marks them as data.
>
> I was kind of thinking:
>
> fragment { 'part1':
> item_type => 'ephemerai' (or data, or something),
> ....
> }
>
> This would mark it to be placed in the system in a location that will never
> make it into the live catalog because it's irrelevant to the application of
> the catalog itself.
>
> Actually, looking at the catalogs, there may be quite a bit of information
> that is irrelevant to the clients in general and could be split into a
> reporting/metadata bundle in case there is an error. If there's no issue,
> you don't need any of this information at all. If you run in debug mode (and
> you know that at instantation time, you need all of it).
It sounds like what we're discussing here might be more effectively
enabled using something like the Builder pattern:
https://en.wikipedia.org/wiki/Builder_pattern
As I understand, the main use case we're discussing is essentially "I
want to construct a resource by building it up from component pieces".
Really, what we want here is to be able to define components or
properties of a resource separately, which the type can later use to
construct the actual resource that will end up in the catalog. This
might look something like:
concat { '/etc/foo.conf':
ensure => present,
# ...
}
Concat['/etc/foo.conf'].add_fragment({
content => '[foo]',
priority => 0,
}
Concat['/etc/foo.conf'].add_fragment({
content => 'bar = true',
priority => 20,
})
Concat['/etc/foo.conf'].add_fragment({
content => 'baz = "bat"',
priority => 10,
>> email to
puppet-dev+...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
puppet-dev+...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVxgMXwnD_rKxRVh5mjwUPkCx0TVg%2Brc4y%3DLVjEUR08WQ%40mail.gmail.com.