radek_sprta.docker

Ansible Role: Docker

This Ansible role helps you install Docker, along with the option to install docker-compose and the Python docker library.

Role Variables

General Options

  • docker_install: Choose whether to install the Docker runtime. Default is true.
  • docker_install_compose: Choose whether to install docker-compose. Default is false.
  • docker_install_python_library: Choose whether to install the Docker Python library. Default is false.
  • docker_package: Specify the name of the Docker package to install. Default is the right system package.
  • docker_pip_package: Specify the name of the pip package to install. Default is the right system package.

Service Options

  • docker_service_enabled: Decide if Docker should start automatically after a restart. Default is true.
  • docker_service_state: Set the state of the Docker service after installation. Default is started.

Docker System Prune

Automatically run docker system prune to keep your system clean of old images and containers.

  • docker_prune_period: Set the time filter for docker system prune to images older than this period. Default is 24 hours.
  • docker_system_prune: Decide if docker system prune should run automatically. Default is true.

Docker Users

  • docker_users: List of users who should be allowed to control Docker (be part of the docker group). Default is an empty list [].

Daemon Options

  • docker_daemon_options: Options to add to the daemon.json file. Default is an empty dictionary {}.

Deprecated Role Options

Not recommended for use.

  • docker_enable_metrics: Enable Prometheus metrics endpoint. Default is false.
  • docker_log_drive: Set the Docker logging driver. Default is json-file.
  • docker_log_opts: Additional logging options, passed as a dictionary.
  • docker_metrics_host: Host for Prometheus metrics. Default is 127.0.0.1.

Example Playbook

- hosts: all
  roles:
     - radek_sprta.docker

License

MIT License

Author Information

Radek Sprta mail@radeksprta.eu

Informazioni sul progetto

A role to install Docker, docker-compose and the python library.

Installa
ansible-galaxy install radek_sprta.docker
Licenza
mit
Download
4.6k
Proprietario