Can I pass the LHS of a cfengine3 processes: line to the RHS?

Posted by joeforker on Server Fault See other posts from Server Fault or by joeforker
Published on 2010-03-22T18:17:17Z Indexed on 2010/03/22 18:21 UTC
Read the original article Hit count: 283

Filed under:
|

I'm using cfengine to start the foobar process. Apparently the LHS is discarded when I use process_select? Can I simply pass the LHS to a function, rather than having to put the command match pattern in a body argument?

bundle agent foobar {
processes:
    "foobar" # documented way would be to use .* here
        process_select => command("foobar"),
        restart_class => start_foobar;

commands:
    start_foobar::
        "/usr/bin/foobar";
}

body process_select command(c) {
    command => "$(c)";
    process_result => "command";
}

© Server Fault or respective owner

Related posts about cfengine

Related posts about cfengine3