#

body common control
{
      bundlesequence => { "overture" };
      inputs => { "libraries/cfengine_stdlib.cf" };
}

#######################################################

bundle agent overture
{
  classes:
      "extended_context" 
      expression => remoteclassesmatching(".*did.*","127.0.0.1","yes","got");

  files:

      "/etc/passwd"
      create => "true",
      classes => set_outcome_classes;


  reports:

    got_did_task_one::
      "task 1 complete";

    extended_context.got_did_task_two::
      "task 2 complete";

    extended_context.got_did_task_three::
      "task 3 complete";

}


body classes set_outcome_classes
{
      promise_kept => { "did_task_one","did_task_two", "did_task_three" };
      promise_repaired => { "did_task_one","did_task_two", "did_task_three" };
      #cancel_kept => { "did_task_one" };
      persist_time => "10";
}

body server control 

{
      allowconnects         => { "127.0.0.1" , "::1",};
      allowallconnects      => { "127.0.0.1" , "::1", };
      trustkeysfrom         => { "127.0.0.1" , "::1",};
}



bundle server access_rules()
{
  access:

      "did.*"
      resource_type => "context",
      admit => { "127.0.0.1" };

}
