I would like to use Puppet to create a single configuration file. This file can have more than one type of Defined Resource, and can have multiple instances of the same Defined Resource.
For instance,
define host {
use linux-server
host_name localhost
alias localhost
address 127.0.0.1
}
define host {
use linux-server
host_name web1
alias web1
address 192.168.0.100
}
define service {
use local-service
host_name localhost, web1
service_description PING
check_command check_ping!100.0,20%|500.0,60%
}
In this example, there would be two instances of a host Defined Resource and one instance of a service Defined Resource.
This post (Is it possible to define a list of Defined Resource in Puppet?) seems to be a start, but I am having a hard time generalizing it for my goals.
Thanks!
Alan