layout | title | categories | published | alias | tags | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
default |
hostrange |
|
true |
reference-functions-hostrange.html |
|
Prototype: hostrange(prefix, range)
Return type: class
Description: Returns whether the current host lies in the range
of
enumerated hostnames specified with prefix
.
This is a pattern matching function for non-regular (enumerated) expressions.
Arguments:
prefix
: Hostname prefix, in the range.*
range
: Enumerated range, in the range.*
Example:
bundle agent example
{
classes:
"compute_nodes" expression => hostrange("cpu-","01-32");
reports:
compute_nodes::
"No computer is a cluster";
}