I am just learning Puppet (we have Puppet Enterprise locally). I am trying to understand the "roles and profiles" pattern. Please pardon any nomenclature slip ups.
How do I create a role with multiple instances of a profile, where the profile instances differ only by parameter? I'm guessing Hiera fits into this somewhere but I'm not exactly sure how.
For example:
Puppetfile:
mod 'puppetlabs-apache', '2.3.0'
apache.pp profile
class profile::apache (
String $port = '80',
) {
class { 'apache':
listen => $port,
}
}
twoapaches.pp role
class role::twoapaches {
include profile::apache
include profile::apache
}
I want an instance of the twoapaches role to have an apache at ports 90 and 100 - how do I do that?