Harrison, Bruce (CXO) wrote: > I need to be able to get the "contents" or value if you will of a > cfengine group from a command line and/or perl script. I did find the > cfagent -p -v which lists the groups but not their contents. ... I > am going to write a perl sub to do this, but thought I would check > here first to see if this functionality already exists somewhere.
cfagent only knows what classes are defined on the current host, not what classes may be defined on other hosts. I think your only option is to parse the policy files directly, assuming they are the same on all hosts (that would depend on how you structure your update.conf). Alternatively, you could maintain your host groups in a database external to cfengine and then generate your cfengine policy from that database. It's all a matter of where you want the canonical data to be. If you choose this route, your command line utility could access the other database directly. Best, Brendan -- Senior System Administrator The University of Chicago Department of Computer Science http://www.cs.uchicago.edu/people/brendan http://praksys.blogspot.com/ _______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
