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 - distributing a MySQL configuration fileusing template expansion

  1. Let's write a configuration file for distributing MySQL configuration files to all the hosts from the master policy distribution server. The configuration file needs to be placed at /etc/my.cnf on all hosts. The following lines may be copied to a configuration file named mysql_params.cf:
    body common control { bundlesequence => { "db_config_template" }; version => "1.0.1"; inputs => { "cfengine_stdlib.cf" }; } bundle agent db_config_template { methods: MySQL:: "DBserver" usebundle => get_template("/etc/my.cnf") ; vars: "socket" string => "/tmp/mysql.sock"; "key_buffer_size" string => "14M"; "max_allowed_packet" string => "2M"; "table_open_cache" string => "512"; } ...

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