cfbs add kernel-settings-sysctl-conf@1.0.1
Manage the current configuration of /etc/sysctl.conf
while keeping running settings in sync.
Note: This policy currently only ensures that specified settings are present. No statement is made about settings not specified. Thus configuration in the file will remain untouched if the key is not specified in the desired data. For example, if vm.swappiness
is set to 10
in /etc/sysctl.conf and vm.swappiness
is not specified the desired configuration data the existing entry for vm.swappiness
will be left untouched.
cfbs add kernel-settings-sysctl-conf
(Optionally) Specify the fully qualified name of the variable that will hold complete configuration data.
default:kernel_settings_sysctl_conf._desired_conf_data_variable
= data:variables.my_sysctl
Define the complete configuration data desired.
data:variables.my_sysctl
= ={ "vm.swappiness": "10", "fs.protected_hardlinks": "1","fs.protected_symlinks" : "1" }=
In CFEngine version 3.18.0 or greater the variables key in Augments supports targeting specific variables in any namespace or bundle.
For example, here we set data:variables.my_sysctl
and configure that variable for use by kernel_settings_sysctl_conf
.
{
"variables": {
"default:kernel_settings_sysctl_conf._desired_conf_data_variable": "data:variables.my_sysctl",
"data:variables.my_sysctl": { "vm.swappiness": "10", "fs.protected_hardlinks": "1",
"fs.protected_symlinks" : "1" }
}
}
This module has no dependencies