Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • meta-information like the command set's name (which can be used in CRON to determine when / how often this command set is run),
  • optional control information like scheduling constraints and an expiration policy for the commands in that set,
  • filters for selecting which devices/nodes the command set should apply to. These are discussed in more detail below.
  • and finally the list of the actual commands to be run (which may also have certain modifiers and meta-data attached to them).

Below is an example of the Command Set file created for this How-To. This Command Set is running a simple df for Linux devices to display the amount of available disk space. You may copy this code to follow along or edit it to suite your needs:

Code Block
%hash = (

  'DF_Test' => {
    'os_info' => {
      'os' => '/(Linux|CentOS|Ubuntu)/'
    },
    'scheduling_info' => {
      'run_commands_on_separate_connection' => 'false',
    },
    'commands' => [
      {
        'privileged' => 'false',
        'command' => 'df',
        'exec' => 'df',
        'tags' => ['Linux','DF','operations'],
      },
    ],
  },
);

...