Hi John, thanks for your reply. Unfortunately that does not solve my actual problem. I want to avoid maintaining multiple vhost entries inside one file. Instead I want to be able to add a vhost by simply adding one file dedicated to that vhost to a directory. This would allow me to easily integrate puppet with a tool that rolls out whole application stacks including the vhosts.
Regards, Stepan On Fri, Sep 6, 2013 at 3:16 PM, jcbollinger <[email protected]>wrote: > > > On Friday, September 6, 2013 1:48:45 AM UTC-5, Stepan Seycek wrote: >> >> Hello Puppet Users, >> >> I am trying to find a solution for the following use case: >> >> On a web server I want to manage many virtual hosts. Instead of declaring >> all these hosts inside one single class (and therefore file) I would prefer >> to have one vhost declaration per file and then import the declarations >> from all those files into the scope of the node or a class. I know that the >> import statement will not work for me but maybe someone here has a solution >> for this. >> >> > > The most direct implementation of what you ask would be to create a > separate class for each vhost, and then 'include' them all into a class or > node. > > Alternatively, if the vhost parameters are sufficiently similar, then you > can use an array resource title, possibly with a wrapper defined type, to > declare all the vhosts compactly in one place: > > site::vhost_wrapper { [ > 'vhost1', > 'vhost2', > 'vhost3', > ... > ]: > # parameters as needed > } > > > John > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
