Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Set sysctl values using hiera #45

Open
surajbora1 opened this issue Sep 23, 2020 · 3 comments
Open

Query: Set sysctl values using hiera #45

surajbora1 opened this issue Sep 23, 2020 · 3 comments
Assignees

Comments

@surajbora1
Copy link

surajbora1 commented Sep 23, 2020

I would like to set multiple sysctl values using hiera, I have checked augeasproviders module, but it has dependencies on multiple module and my requirement is only sysctl. Is there any best way to to set sysctl values using hiera using augeasproviders_sysctl.

@raphink
Copy link
Member

raphink commented Sep 28, 2020

The dependencies to the augeasproviders module are soft, you don't need to install them all if you don't want to.

@raphink raphink self-assigned this Sep 28, 2020
@olevole
Copy link
Contributor

olevole commented Jan 14, 2021

my hiera use case:

modules/profile/manifests/sysctl.pp:

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

in the role yaml:

classes:
  - profile::sysctl 

profile::sysctl::entries:
  net.ipv4.tcp_rmem:
    value: 4096 87380 16777216
  net.ipv4.tcp_wmem:
    value: 4096 65536 16777216
  net.core.rmem_max:
    value: 16777216

@raphink
Copy link
Member

raphink commented Jan 14, 2021

The augeasproviders modules has augeasproviders::instances for that:

You'll just need to use the augeasproviders::instances::sysctl_hash key in hiera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants