[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Group "Contents"

From: Brendan Strejcek
Subject: Re: Getting Group "Contents"
Date: Fri, 17 Mar 2006 11:49:02 -0600
User-agent: Mutt/1.5.6+20040818i

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.


Senior System Administrator
The University of Chicago
Department of Computer Science

reply via email to

[Prev in Thread] Current Thread [Next in Thread]