This program generate a bunch of definition files for Cfengine, one for each RackTables tag, containing the names of the devices with that tag.

The list of tags to process can be given by the [cfengine-tags]/tags config parameter or the --tags option. If no explicit list is provided, process all the tags attached to the devices.

In a similar way, a list of attributes can be given with the [cfengine-tags]/attrs config parameter or the --attrs option. The value of these attributes will be mogrified to generate additional tags.

A filter can be given, either by the [cfengine-tags]/filter config parameter or the --filter option, to filter the result devices list: only the devices with any of the given tags or attribute name-value pairs will be included. A lack of tag or attribute definition disables the filtering of that type.

path - specify the path where to write the tags files; will be overridden by the --output-path option

type - specify the default type if none is given to the command; default to "server".

tags - specify the defaults tags as a comma-separated list; will be overridden by the --tags option

attrs - specify some attributes, as a comma-separated list, which values will be used as tag names; will be overridden by the --attrs option

filter - specify a comma-separated list of tokens, defining tags and attribute values; will be overridden by the --filter option.

When defined, only the devices with the matching tags and attributes will be included in the resulting lists. When no tag or attribute pair is defined, the filtering fot that particular type is disabled.

The sub-syntax of the tokens is:

a token in the form tag:name defines the tag with the given name

a token in the form attr=value defines the pair (attribute, value)

Examples:

only keep the devices with the tags generic and infra (no attribute filtering):

tag:generic, tag:infra

only keep the devices with the attribute Use set to prod or preprod (no tag filtering):

Use=prod, Use=preprod

only keep the devices with the tag cfengine and the attribute Use set to prod or preprod: