voxpupuli / puppet-augeasproviders_sysctl

Augeas-based sysctl type and provider for Puppet
Apache License 2.0
10 stars 36 forks source link

Using with Hiera #16

Closed mergar closed 6 years ago

mergar commented 7 years ago

You can write in the documentation/examples how we can use this provider to describe the sysctl parameters via hiera ? Thank you.

raphink commented 7 years ago

If you mean using data bindings, then you'll need a class to do the mapping. Something like:

class profile::sysctl (
  $entries = {},
) {
  create_resources('sysctl', $entries)
}

and then store the sysctl entries in hiera as profile::sysctl::entries.

tpdownes commented 7 years ago

@mergar you might consider tpdownes/sysctl which was written to supports Puppet 4/5 with hiera v5.

raphink commented 6 years ago

This feature is also available in the augeasproviders module, where you can use the augeasproviders::instances::sysctl_hash hiera entry.