community.general.monit (8.5.0) — module

Manage the state of a program monitored via Monit

Authors: Darryl Stoflet (@dstoflet), Simon Kelly (@snopoke)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage the state of a program monitored via Monit.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Manage the state of program httpd to be in started state
  community.general.monit:
    name: httpd
    state: started

Inputs

    
name:
    description:
    - The name of the C(monit) program/process to manage.
    required: true
    type: str

state:
    choices:
    - present
    - started
    - stopped
    - restarted
    - monitored
    - unmonitored
    - reloaded
    description:
    - The state of service.
    required: true
    type: str

timeout:
    default: 300
    description:
    - If there are pending actions for the service monitored by monit, then Ansible will
      check for up to this many seconds to verify the requested action has been performed.
      Ansible will sleep for five seconds between each check.
    type: int