Create a definition that create the environments :

define prepare_env() {

    $env = $name

    file { "e${env}-website1":
        ...
    }
    ...

}


And in a class, call it with the array "envs":

class main_class {

    prepare_env{$envs: }

}



neerolyte wrote:
> I'm struggling to figure out how to do this as I just don't know what
> to search for...
>
> What we have: e1 - e9 (e1 being dev, e9 being prod, middle
> environments being test machines of various degrees).
>
> All environments have a fixed set of websites, call them eX-website1,
> eX-website2, etc...
>
> On some physical boxes we are forced to run multiple environments to
> save money so what I need in Apache's vhosts folder is something like
> this:
>
> for each envs as $env {
>     file { "e${env}-website1":
>         ...
>     }
>     ...
> }
>
> but I don't know how to do this... any ideas?
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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