Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 781 Bytes

hostrange.markdown

File metadata and controls

42 lines (28 loc) · 781 Bytes
layout title categories published alias tags
default
hostrange
Reference
Functions
hostrange
true
reference-functions-hostrange.html
reference
communication functions
functions
hostrange

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";

}