Created
March 24, 2020 11:13
-
-
Save b4ldr/f60aeffeb30fd646872c87419091d012 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this will create the sysctl fragment if it dosn;t exist or changes | |
# If the resource changes i.e. the first time its written or you change the value | |
# sysctl -p will be called to write al the sysctl values | |
# however a module from the forge may be better i have used the following in the past | |
# https://forge.puppet.com/thias/sysctl | |
# however that is old and the following newer one may be better | |
# https://forge.puppet.com/herculesteam/augeasproviders_sysctl | |
sysctl::internals::add_sysctl_fragment { "${name}": | |
target => $target, | |
content => template("sysctl/parameter_line.erb"), | |
order => $order, | |
comment => $comment, | |
notify => Exec['sysctl -p'], | |
} | |
exec{'sysctl -p': | |
refreshonly => true, | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment