No description
  • Python 96.8%
  • Shell 3.1%
  • Dockerfile 0.1%
Find a file
2026-04-27 22:58:50 +00:00
.azure-pipelines Update AZP config. (#185) 2021-07-30 17:45:56 +02:00
changelogs Release 1.9.1. 2021-08-29 13:44:07 +02:00
docs/docsite Fix URL to docker inventory script. (#148) 2021-06-03 21:37:59 +02:00
meta Add collection-side support for the docker action group. (#17) 2020-11-01 17:04:48 +01:00
plugins docker_containers inventory: fix wrong default mentioned in docs, add fallback example (#194) 2021-08-26 08:32:50 +02:00
tests Improve CI (#198) 2021-09-08 09:43:35 +02:00
.gitignore Initial commit 2020-10-30 07:05:51 +01:00
CHANGELOG.rst Release 1.9.1. 2021-08-29 13:44:07 +02:00
COPYING Initial cleanup. 2020-10-30 07:05:51 +01:00
Dockerfile Add Dockerfile: ansible runner with community.docker collection installed 2026-04-27 22:58:50 +00:00
galaxy.yml Next expected release is 1.10.0. 2021-08-29 14:11:58 +02:00
README.md Update README with comprehensive project information 2026-04-27 20:36:52 +00:00

community.docker

Overview

This repo contains the community.docker Ansible Collection. The collection includes many modules and plugins to work with Docker.

Detected project types: Ansible role, Ansible collection.

At a glance

  • Default branch: main
  • Visibility: public
  • Size: 948 KB
  • Created: 2026-04-27
  • Last updated: 2026-04-27
  • Stars / Forks / Open issues: 0 / 0 / 0
  • License: GPL-3.0

Languages

Language Bytes Share
Python 772,165 bytes 96.9%
Shell 24,668 bytes 3.1%
Dockerfile 65 bytes 0.0%

Repository structure

  • .azure-pipelines/
  • changelogs/
  • docs/
  • meta/
  • plugins/
  • tests/
  • .gitignore (1,846 B)
  • CHANGELOG.rst (20,632 B)
  • COPYING (35,149 B)
  • galaxy.yml (765 B)
  • README.md (5,966 B)

Getting started

Clone the repository:

git clone https://forgejo.deployview.com/ssa/community.docker.git
cd community.docker

Installation

ansible-galaxy install -r requirements.yml
ansible-playbook playbook.yml

Usage

Include this role/collection in a playbook and run with ansible-playbook. See defaults/main.yml (if present) for configurable variables.

Original README

The content below is preserved from the previous README. Headings have been demoted so they don't compete with the new top-level sections.

Docker Community Collection

Doc Build Status Codecov

This repo contains the community.docker Ansible Collection. The collection includes many modules and plugins to work with Docker.

Please note that this collection does not support Windows targets. The connection plugins included in this collection support Windows targets on a best-effort basis, but we are not testing this in CI.

Tested with Ansible

Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.

External requirements

Most modules and plugins require the Docker SDK for Python. For Python 2.6 support, use the deprecated docker-py library instead.

Both libraries cannot be installed at the same time. If you accidentally did install them simultaneously, you have to uninstall both before re-installing one of them.

Included content

  • Connection plugins:
    • community.docker.docker: use Docker containers as remotes
  • Inventory plugins:
    • community.docker.docker_machine: collect Docker machines as inventory
    • community.docker.docker_swarm: collect Docker Swarm nodes as inventory
  • Modules:
    • Docker:
      • community.docker.docker_container: manage Docker containers
      • community.docker.docker_container_exec: run commands in Docker containers
      • community.docker.docker_container_info: retrieve information on Docker containers
      • community.docker.docker_host_info: retrieve information on the Docker daemon
      • community.docker.docker_image: manage Docker images
      • community.docker.docker_image_info: retrieve information on Docker images
      • community.docker.docker_image_load: load Docker images from archives
      • community.docker.docker_login: log in and out to/from registries
      • community.docker.docker_network: manage Docker networks
      • community.docker.docker_network_info: retrieve information on Docker networks
      • community.docker.docker_plugin: manage Docker plugins
      • community.docker.docker_prune: prune Docker containers, images, networks, volumes, and build data
      • community.docker.docker_volume: manage Docker volumes
      • community.docker.docker_volume_info: retrieve information on Docker volumes
    • Docker Compose:
      • community.docker.docker_compose: manage Docker Compose files
    • Docker Swarm:
      • community.docker.docker_config: manage configurations
      • community.docker.docker_node: manage Docker Swarm nodes
      • community.docker.docker_node_info: retrieve information on Docker Swarm nodes
      • community.docker.docker_secret: manage secrets
      • community.docker.docker_swarm: manage Docker Swarm
      • community.docker.docker_swarm_info: retrieve information on Docker Swarm
      • community.docker.docker_swarm_service: manage Docker Swarm services
      • community.docker.docker_swarm_service_info: retrieve information on Docker Swarm services
    • Docker Stack:
      • community.docker.docker_stack: manage Docker Stacks
      • community.docker.docker_stack_info: retrieve information on Docker Stacks
      • community.docker.docker_stack_task_info: retrieve information on tasks in Docker Stacks
    • Other:
      • current_container_facts: return facts about whether the module runs in a Docker container

Using this collection

Before using the General community collection, you need to install the collection with the ansible-galaxy CLI:

ansible-galaxy collection install community.docker

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
- name: community.docker

See Ansible Using collections for more details.

Contributing to this collection

If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATH, and work on it there.

You can find more information in the developer guide for collections, and in the Ansible Community Guide.

Release notes

See the changelog.

More information

Licensing

GNU General Public License v3.0 or later.

See COPYING to see the full text.

Contributing

Contributions are welcome. The typical workflow is:

  1. Open an issue describing the change you'd like to make.
  2. Fork the repository (or create a feature branch if you have write access).
  3. Commit your changes with clear, descriptive messages.
  4. Open a pull request against the main branch.

Please follow the existing code style and include tests or reproduction steps where relevant.

License

This project is licensed under the GPL-3.0 license. See the LICENSE file for the full text.

Repository


This README was generated automatically based on repository metadata, contents, and any prior README content. Edit any section above to add project-specific detail.