Ask Your Question

Revision history [back]

The variables used in ERB templates should come from your manifests, not directly from hiera.

You need something like:

Hiera:

app_regaaa::radldap_props::filter: '...<your_filter>...'

Manifest:

class app_regaaa::radldap_props (
  filter,
) {
  validate_string($filter)
  ...

ERB template:

filter = "<%= @filter %>"

Note that you may have trouble escaping the % sign in your hiera data, have a look at e.g. https://tickets.puppetlabs.com/browse/HI-127

The variables used in ERB templates should come from your manifests, not directly from hiera.

You need something like:

Hiera:

app_regaaa::radldap_props::filter: '...<your_filter>...'

Manifest:

class app_regaaa::radldap_props (
  filter,
) {
  validate_string($filter)
  ...

ERB template:

filter = "<%= @filter %>"

Note that you may have trouble escaping the % sign in your hiera data, have a look at e.g. https://tickets.puppetlabs.com/browse/HI-127this jira ticket

The variables used in ERB templates should come from your manifests, not directly from hiera.

You need something like:

Hiera:

app_regaaa::radldap_props::filter: '...<your_filter>...'

Manifest:

class app_regaaa::radldap_props (
  filter,
$filter,
) {
  validate_string($filter)
  ...

ERB template:

filter = "<%= @filter %>"

Note that you may have trouble escaping the % sign in your hiera data, have a look at e.g. this jira ticket