Managing Sysctl With CFEngine

From Kyle's Wiki
Jump to: navigation, search

Managing sysctl.conf is pretty easy with the cfengine editfiles function:

editfiles:

        { /etc/sysctl.conf
                #Delete lines with that in it, commented or otherwise
                DeleteLinesContaining "net.ipv4.conf.all.log_martians"

                #Define that class if the file was edited
                DefineClasses "reload_sysctl"
        }

shellcommands:
        reload_sysctl::
                #We will get stderr if there is a problem
                "/sbin/sysctl -p >/dev/null"

Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta