computer-playbook/roles/health-docker-container
2023-12-24 19:19:07 +01:00
..
files Implemented check for excited != 0 https://chat.openai.com/share/981ecca4-9df7-4086-b99e-1b60f2632bf6 2023-12-24 19:19:07 +01:00
handlers implemented check for anonymous volumes 2023-11-17 16:53:56 +01:00
meta Changed systemd-notifier namings 2023-12-03 11:24:17 +01:00
tasks Removed unnecessary default value 2023-12-15 13:27:23 +01:00
templates implemented check for anonymous volumes 2023-11-17 16:53:56 +01:00
vars implemented check for anonymous volumes 2023-11-17 16:53:56 +01:00
README.md Changed systemd-notifier namings 2023-12-03 11:24:17 +01:00

Health Check for Docker Containers

Description

This Ansible role is designed to ensure the health of Docker containers running on a system. It includes a script that checks for unhealthy or exited Docker containers and sets up a systemd service and timer to regularly execute this check.

Files

  • vars/main.yml: Variable definitions for the script's directory.
  • handlers/main.yml: Handlers to reload and restart the systemd service and timer.
  • files/health-docker-container.sh: The script that checks the container health.
  • tasks/main.yml: Tasks to create necessary directories, copy scripts, and create systemd service and timer.
  • templates/health-docker-container.service.j2: Systemd service template.
  • templates/health-docker-container.timer.j2: Systemd timer template.
  • meta/main.yml: Meta information declaring dependencies for the role.

Usage

To use this role, include it in your playbook and set the path_administrator_scripts variable to the desired path for the health check scripts.

Ensure that the systemd-notifier dependency is satisfied for error notifications.