It's possible to use inline_epp's using string variable like this ?
"htaccess": {
"content": [
"<% include stdlib -%>",
"AuthType Basic ",
"AuthUserFile <%= $auth_file %>",
"Require valid-use"
],
"params": {
"auth_name": "Bootstrap content for provisioning",
"auth_file": "file_path"
}
}
and (some.pp):
$htacces = $sub_attrs['htaccess']
$content = $htacces['content']
$data = join($content, "\n")
$auth_file = "sgsdgsdfgsdfg"
notice inline_epp($data)
This is result in the notice line : Invalid EPP: This Name has no effect. A value was produced and then forgotten (one or more preceding expressions may have the wrong form)
Idea is use hiera data to deliver content to epp . Using puppet 5.5.2 and Ubuntu 16.04