Created
July 24, 2012 22:21
-
-
Save supercow/3173059 to your computer and use it in GitHub Desktop.
Defining vhosts in Hiera, assigining them with an ENC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
:hieradata: | |
- vhosts/%{hostname}/%{vhost_name} | |
- vhosts/%{vhost_name} | |
- vhosts/common.yaml | |
- common.yaml | |
:backends: | |
- yaml | |
:datadir: | |
- '/etc/puppet/hieradata' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define apache::vhost { | |
$vhost_name = "vhost_${name}" | |
$vipname = hiera("vhost_vipname",$name) | |
$cert = hiera("vhost_cert", "${name}.crt") | |
$docroot = hiera("vhost_docroot", "/var/www/${name}") | |
#... resources and stuff ... | |
} | |
apache::vhost { $array_of_vhost_names_from_foreman: } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment