About | FAQ | Help
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If the servername will always be used in the docroot '/www/servername/html' then you could just reference that value from hiera and use a file resource to build the required directory:

$docroot_dir = hiera('servername')

file "/www/$build_docroot" {
   ensure => directory,
}

If the servername will always be used in the docroot '/www/servername/html' then you could just reference that value from hiera and use a file resource to build the required directory:

$docroot_dir = hiera('servername')

file "/www/$build_docroot" "/www/$docroot_dir" {
   ensure => directory,
}