Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems this worked :)

    $env_names = keys($envvars)
    $prefixedenvnames = prefix($env_names, "${path}/envdir/")
    daemontools::envfile { $prefixedenvnames:
        value  => $envvars
    }
}

define daemontools::envfile($value) {
    $tmp = inline_template('<%= name.split("/").last %>')
    file { $name :
        mode    => 0644,
        content => "${value[$tmp]}";
    }
}