O'Reilly logo

CFEngine 3 Beginner's Guide by Rajneesh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - setting system variables

  1. Let's write a configuration file with which we want to reset the system variables in the system configuration file. For Red Hat based systems this file is /etc/sysctl.conf. The following lines may be copied to the file system_set_vars.cf:
    bundle agent set_variables { vars: "sys_config[net.ipv4.tcp_syncookies]" string => "1"; "sys_config[net.ipv4.icmp_echo_ignore_broadcasts]" string => "1"; "sys_config[net.ipv4.tcp_fin_timeout]" string => "45";; "sys_config[net.ipv4.tcp_keepalive_time]" string => "3600"; files: "/etc/sysctl.conf" create => "true", edit_line => set_variable_values("set_variables.sys_config"); } bundle edit_line set_variable_values(v) { vars: "index" slist => getindices("$(v)"); "cindex[$(index)]" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required