Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I'm testing out cfengine deploys in rhel 5.6. Everything works great but I am wondering if there is a way for the community edition of cfengine to report to a file all the files it has deployed to a system. I deploy all files from a policy host via secure cp. I'm using cfengine3 community edition.

share|improve this question

1 Answer 1

I realise this is old, but there was no answer ...

This may be possible in the Nova edition. If you want to cobble something together with the community edition I think what you would need to do is define a class if repaired, or always whatever depending what kind of report your looking to get for that file, then have a report to file based on that class existence.

vars:
    "etc_profile" string => "/var/cfengine/distrib/etc/profile";
files:
    "/etc/profile"
        copy_from => secure_cp("$(etc_profile)", "$(sys.policy_hub)"),
        classes   => if_repaired("distributed_etc_profile"),
        comment   => "Get /etc/profile from distribution server, and define class when distributed so we can report on it";

reports:
    distributed_etc_profile::
        "$(sys.date) $(sys.host) /etc/profile",
            report_to_file => "/tmp/received_file_from_dist";

If you want it collected back to a central point, thats also something you would have to orchestrate. You mgiht want to just post that file to a webdav server so you dont have to have each host defined in the central servers policy to do a copy from.

Anyway, I know the answer is long overdue, but I hope it helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.