body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { build_linux_limits_conf };
}

bundle agent build_linux_limits_conf
{
  vars:
        "limits[glob-dash-nofile]"    string            =>    "*        -    nofile        30000",        policy => "free";
        "limits[app-soft-nproc]"    string            =>    "app        soft    nproc        16357",        policy => "free";
      "values" slist => getvalues("limits");

  files:
      "$(G.testfile)"
      create => "true",
      edit_line => insert("@(build_linux_limits_conf.values)"),
      edit_defaults => empty;
}

bundle edit_line insert(str)
{
  insert_lines:
      "$(str)";
}
