Puppet: System Administration Automated

Support

Ticket #1263 (new enhancement)

Opened 6 months ago

Support client-side templates

Reported by: luke Assigned to: jamtur01
Priority: normal Milestone: 0.24.5
Component: RAL Version:
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Attached Patches: Tests Complexity: Unknown

Description

I've just pushed a commit to my repo in feature/resource_template that provides client-side templates. The templates are evaluated with access to the specified resource's attributes.

They're mostly useful for building composite resources, maybe like so:

... my resource code ...
  def generate
    Puppet::Type.type(:file).create :path => "/my/file",
      content => Puppet::Util::ResourceTemplate.new("/my/template", self).evaluate
  end
...

This is a small patch, and will likely rarely be used (and probably never from within Puppet's core), but it's already in use at a client and will likely be used at other places that need to build composite resources or use an API to generate resources rather than using the language for specifying all of them.