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

Persisting a sysctl that does not exist yet #49

Open
zenitraM opened this issue Jan 25, 2021 · 1 comment
Open

Persisting a sysctl that does not exist yet #49

zenitraM opened this issue Jan 25, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@zenitraM
Copy link

Hi! 👋 I want to persist a sysctl that does not exist on the running system.
This is because I want it to be enabled on next reboot before a kernel upgrade, so it gets enabled at boot before a subsequent Puppet run.

This would be something that, reading the docs, I thought would be doable using:

sysctl { "non_existing_sysctl":
  ensure  => present,
  value   => "1",
  apply   => false,
  persist => true,
}

However, if the sysctl does not exist, it currently fails (as it checks for its presence from the list obtained by sysctl -a), and if the :silent=>true parameter is set, it just adds the comment, not the actual value.

Would this be a behavior that would make sense adding to the module?. I see there is some support implemented for non-existent sysctls already for absent but not for present.

@raphink raphink added the enhancement New feature or request label Jan 26, 2021
@raphink
Copy link
Member

raphink commented Jan 27, 2021

I think that could be interesting. You'll have to bypass the prefetch mechanism though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants