Skip to content

Instantly share code, notes, and snippets.

@noahcampbell
Created February 7, 2011 21:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahcampbell/815221 to your computer and use it in GitHub Desktop.
Save noahcampbell/815221 to your computer and use it in GitHub Desktop.

#resources

Example Usage:

Matching Nodes

$ resources 

Returns the current localhost.

$ resources os:unix

Return a list of all resources that contain the combination key: os and value: unix.

$ resources os:!unix 

Return a list of resources that do not match the unix operating system.

$ resources [ -e | -g ] [ -i ] os:/unix.*

Return a list of resources who's operating system match the regular expression unix.*

Options for the above include:

-e extended regular expressions -g glob expression -i insensitive

Providers

Providers are configured in /etc/rundeck/providers.d/<provider> The <provider> represents the name and any format is permissible??? Seed provider(5) for more detail.

$ resources -a

Return a list of all nodes from all providers

$ resources -P xyz

Return a list of hosts for a given resource Provider xyz, exploding all others

$ resources -P xyz,abc

Return a list of hosts for a given resource Provider xyz or abc while eXcluding provider def

$ resources -X def

Return a list of hosts excluding def. -X implies -a

$ resources -P xyz -O "options to provider xyz" -P abc -O "optoins to" -O " provider abc"

Return a list of of nodes from provider xyz providing additional options. The corresponding -O following a -P binds the associations. Multiple -O's are accumulated and passed as parameters to the underlying provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment