---
name: "App::ClusterSSH::Cluster"
section: "3pm"
platform: "linux"
package: "clusterssh"
version: "4.18-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/App::ClusterSSH::Cluster"
---

# App::ClusterSSH::Cluster(3pm)

## SYNOPSIS

## DESCRIPTION

Object representing application configuration

## METHODS

- $cluster=ClusterSSH::Cluster-\>**new()**;

  Create a new object.  Object should be common across all invocations.

- $cluster-\>get\_cluster\_entries($filename);

  Read in /etc/clusters, `$HOME`/.clusterssh/clusters and any other given  file name and register the tags found.

- @external\_tags=**list\_external\_clusters()**

  Call an external script suing `"-L"` to list available tags

- @resolved\_tags=get\_external\_clusters(@tags)

  Use an external script to resolve `@tags` into hostnames.

- $cluster-\>get\_tag\_entries($filename);

  Read in /etc/tags, `$HOME`/.clusterssh/tags and any other given  file name and register the tags found.

- $cluster-\>read\_cluster\_file($filename);

  Read in the given cluster file and register the tags found

- $cluster-\>expand\_filename($filename);

  Expand ~ or `$HOME` in a filename

- $cluster-\>read\_tag\_file($filename);

  Read in the given tag file and register the tags found

- $cluster-\>register\_tag($tag,@hosts);

  Register the given tag name with the given host names.

- $cluster-\>register\_host($host,@tags);

  Register the given host on the provided tags.

- @entries = $cluster-\>get\_tag('tag');

  - $entries = $cluster-\>get\_tag('tag');

  Retrieve all entries for the given tag.  Returns an array of hosts or  the number of hosts in the array depending on context.

- @tags = $cluster-\>**list\_tags()**;

  Return an array of all available tag names

- %tags = $cluster-\>**dump\_tags()**;

  Returns a hash of all tag data.

- @tags = $cluster-\>expand\_glob( $type, $name, @items );

  Use shell expansion against each item in `@items`, where `$type` is either 'node', or 'tag' and `$name` is the node or tag name.  These attributes are presented to the user in the event of an issue with the expanion to track down the source.
