Skip to content

Tasks and Fact Collectors

Introduction

Muppy connects over SSH to Hosts to execute Tasks and/or collect Facts.

Tasks:

  • allow commands to be run on Hosts. Muppy handles 2 types of Tasks:
    • Internal — these are functions written in Python inside Muppy's internal Scripts.
    • Shell Script — these are shell scripts written directly in the Muppy interface.
  • are "analyzed" and exposed in the Muppy graphical interface, which lets any type of user run or schedule them.
  • are executed through an asynchronous Jobs system that traces every execution and maintains a log of all operations performed by the tasks.

Internal Tasks are "debuggable" and concise — little code compared to the original "shell" commands.

Facts are configuration data required to execute Tasks, collected by running specific tasks called Fact Collectors. Fact Collectors are always "Internal" Tasks.

POSTGRESQL_INSTALLED_VERSIONS = [12,13] is an example of a Fact.

A Muppy Addon groups together a set of Tasks along with a specific User Interface that lets you exploit them.

Example of an "Internal" Task and a Fact Collector

Example of Tasks and a Fact Collector — installing glances

The Task Run object lets you manage the execution of Tasks.

Task Runs Execution

Each time a Script (or a Muppy Addon) is installed/uninstalled, or whenever the signature of a Task is modified, you must use:

Synchronizing Tasks and Scripts

The following features let you inspect the objects related to Tasks:

Scripts List

Tasks List

Fact Definitions List