Hi,

I'm updating an existing Puppet module so that I can use it with Hiera.

The node yaml files contains the following

selinux::mode: 'enforcing'
selinux::booleans:
  'httpd_can_network_connect':
    ensure: true
  'httpd_setrlimit':
    ensure: true

I can get the lookup to work using the following class:

class selinux (
  $mode = $::selinux::params::mode,

  ### START Hiera Lookups ###
  $selinux_booleans = {}
  ### END Hiera Lookups ###
) inherits selinux::params {

  class { 'selinux::package': } ->
  class { 'selinux::config': }

  $booleans = hiera('selinux::booleans')
  create_resources('selinux::boolean', $booleans)
}

But it doesn't work with the one below (which is the format I've seen used 
elsewhere):

class selinux (
  $mode = $::selinux::params::mode,

  ### START Hiera Lookups ###
  $selinux_booleans = {}
  ### END Hiera Lookups ###
) inherits selinux::params {

  class { 'selinux::package': } ->
  class { 'selinux::config': }

  create_resources('selinux::boolean', $selinux_booleans)
}

Please could somebody let me know why the latter of the two doesn't work?

Thanks,
A

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4a29fa1a-25d7-46d6-9001-702235b71626%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to