iac_stack/ansible/roles/deploy_container_healthchecks
2025-08-13 17:43:37 +02:00
..
defaults add new container 2025-08-13 17:43:37 +02:00
files add new container 2025-08-13 17:43:37 +02:00
handlers add new container 2025-08-13 17:43:37 +02:00
meta add new container 2025-08-13 17:43:37 +02:00
tasks add new container 2025-08-13 17:43:37 +02:00
templates add new container 2025-08-13 17:43:37 +02:00
vars add new container 2025-08-13 17:43:37 +02:00
README.md add new container 2025-08-13 17:43:37 +02:00

Role: deploy_container_traefik

Purpose

This role deploys and configures a Healthchecks.io Container with Docker Compose

Variables

Default Variables (defaults/main.yml)

container_healthchecks_domain: health.example.com
container_healthchecks_version: v3.10
container_healthchecks_email_from: "healthchecks@your.domain.com"
container_healthchecks_email_host: smtp.your.domain.com
container_healthchecks_email_password: your_email_password
container_healthchecks_email_user: healthchecks@your.domain.com
container_healthchecks_email_port: 587
container_healthchecks_email_tls: true
container_healthchecks_email_user_verification: true
container_healthchecks_secret_key: your_secret_key
container_healthchecks_site_name: "Healthchecks"

Secret Key Generation

Generate a secure secret key for Django You can use ´´´ python3 -c "import secrets; print(secrets.token_urlsafe(50))" ´´´ to generate a new key or use an online Generator like https://djecrety.ir/

Static Variables (vars/main.yml)

container_base_dir: /opt/docker/healthchecks

Role Usage

- name: Deploy Healthchecks.io container
  hosts: docker
  roles:
    - role: deploy_container_healthchecks

Requirements

  • Linux system (tested on Debian)
  • Docker Engine
  • Docker Compose v2 plugin (docker compose CLI)
  • Ansible 2.11 or higher
  • community.docker collection

Install the required collection:

ansible-galaxy collection install community.docker

Or via requirements.yml:

collections:
  - name: community.docker
    version: ">=3.4.0"

Authors