Ask Your Question
0

Apache Vhost Defined type

asked 2013-04-09 15:54:34 -0500

kdoswald gravatar image

updated 2013-04-13 11:25:45 -0500

jonn gravatar image

I would like to setup apache to manage are vhosts.

Standard define apache::vhost ($port, $serveralias).. etc

But we are using DSR so have multiple entries for each vhost because of all the IP's allocated to that host. Is their a way to use a array to pupulate multiple fields at one time? Rather then have variables for each one.. or have to add multiple apahce::vhost to my site.pp.

edit retag flag offensive close merge delete

Comments

Sorry should have been more clear. http://pastebin.com/x7a8WeDY Quickly written example what I would like. So could pass it multiple ip address's and generate apache vhost config ...(more)

kdoswald gravatar imagekdoswald ( 2013-04-09 16:58:21 -0500 )edit

See my answer about create resources.

Ancillas gravatar imageAncillas ( 2013-04-11 11:01:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-09 16:07:20 -0500

Ancillas gravatar image

updated 2013-04-09 16:09:25 -0500

It's really hard to determine what you're trying to accomplish without code samples, and your question is confusing the way it's worded, but I'll take a stab and suggest using create_resources.

create_resources('apache::vhost', $vhost_hash)

$vhost_hash would be a hash that defined each vhost, and its parameters. The create_resources function then loops through the hash and creates a resource for each entry and its children.

create_resources GitHub Page

edit flag offensive delete link more

Comments

I suppose you could pass in a super large data structure, and parse it within your ERB template, but since you're using a defined type, you may as well ...(more)

Ancillas gravatar imageAncillas ( 2013-04-11 11:02:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-09 15:54:34 -0500

Seen: 2,131 times

Last updated: Apr 09 '13