Playbooks
The Docker module provides a default playbook docker.yml for installing Docker Daemon and Docker Compose.
docker.yml
Playbook source file: docker.yml
Running this playbook will install docker-ce and docker-compose-plugin on target nodes with the docker_enabled: true flag, and enable the dockerd service.
The following are the available task subsets in the docker.yml playbook:
docker_install: Install Docker and Docker Compose packages on the nodedocker_admin: Add specified users to the Docker admin user groupdocker_dir: Create Docker related directoriesdocker_config: Generate Docker daemon service configuration filedocker_launch: Start the Docker daemon servicedocker_register: Register Docker daemon as a monitoring target (alias tags:register/add_metrics)docker_image: Attempt to load pre-cached image tarballs from/tmp/docker/*.tgz(if they exist)
The Docker module does not provide a dedicated uninstall playbook. If you need to uninstall Docker, you can manually stop Docker and then remove it:
Changing docker_enabled to false only makes docker.yml skip the entire Docker role. It does not stop or uninstall an existing Docker deployment, nor delete /data/docker.
The manual commands above also leave the data directory in place. Docker’s VictoriaMetrics file-discovery target can be deregistered together with the node through the node_deregister task in node-rm.yml.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)