Let's start with this:

class whatever ( $myType='other' ) {
    file { "some-config-file":
        ...
        content => $myType ? {
            'this'  => template("whatever/this.erb"),
            'that'  => template("whatever/that.erb"),
            'other' => template("whatever/other.erb"),
            default => template("whatever/default.erb"),
        }
        ...
    }
}

I think I have all the cases covered my the "myType" parameter, but I would 
REALLY like to be able to mix this with the multiple source syntax:

        source => [
            "puppet:///modules/whatever/${fqdn}-config-file",
            "puppet:///modules/whatever/default.config-file",
        ],

into something like this :

        source => [
            "puppet:///modules/whatever/${fqdn}-config-file",
            content => $myType ? {
                'this'  => template("whatever/this.erb"),
                'that'  => template("whatever/that.erb"),
                'other' => template("whatever/other.erb"),
                default => template("whatever/default.erb"),
            }
        ],

So that I can override the type-driven template with a flat file.

I am trying to design flexibility, and I am finding a "conflict of purpose" 
between the source snd content metaparameters.
 
“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to