Forum: CFEngine Help
Subject: Re: Is there any way to check configuration changeset is applied to 
managed hosts?
Author: tjavo87
Link to topic: https://cfengine.com/forum/read.php?3,24537,24538#msg-24538

Kaiwang Chen Wrote:
-------------------------------------------------------
> Hello list members,
> 
> I am not sure whether it's the right way thinking
> in cfengine: is
> there any way to figure out configuration
> changeset is delivered to
> and applied to target hosts? In certain cases I
> would like to know
> when and whether it takes effect.
> 
> Thanks,
> Kaiwang
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengin
> e

Hi Kaiwang,

It's possible to see when a promise is repaired. For example;
If you wanna know if there is a new file copied to the client, you can use the 
following bundle;


bundle agent test {

files:

       "/tmp/test"
        copy_from => secure_cp("$(def.config)/test","$(def.policy_server)"),
        classes => if_repaired("copy_ok");

reports:

  copy_ok::

    "$(sys.date) New issue.net copied to /etc"

      report_to_file => "/var/cfengine/reports/$(sys.host)/test";
}



In the above code, when the promise is repaired there is log written to a file 
called test. You can also use standard output instead of a file.

I hope this is what you're looking for.

Regards

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to