I'm having issues with CFEngine's templating system. I install a package, ganglia in this specific case, that creates a default config file. Then I want to add lines to
/etc/ganglia/gmond.conf depending on if its the the collection server or if its just feeding information out and whate colo the server is in. So I made a template and I'm using some variables for where I want different information.
When I manually remove
/etc/ganglia/gmond.conf and run cfagent the template is expanded properly and looks correct.
When I run cfagent with the default config from the ganglia package in place it just appends the lines that don't exist to the bottom of the default config file.
Right now the
expand_template block I'm using looks like:
"/etc/ganglia/gmond.conf" comment => "Expanding gmond.conf template", create => "true", edit_line => expand_template("$(g.inputfiles)/modules/ganglia/templates/gmond.conf");
I'm guessing there's something I want to use beside
edit_line but my google-fu is failing me.
We are using the community editition of cfengine3 with just the standard library.