arillso.container.docker_compose role – Configure and manage Docker Compose environment using Ansible
Note
This role is part of the arillso.container collection (version 0.0.7).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it use: ansible-galaxy collection install arillso.container
.
To use it in a playbook, specify: arillso.container.docker_compose
.
Entry point main
– Configure and manage Docker Compose environment using Ansible
Synopsis
This spec outlines parameters for configuring Docker Compose with Ansible.
It includes Docker Compose version, package names, directory paths, configuration methods, and project name.
Parameters
Parameter |
Comments |
---|---|
Docker API version to use, set to ‘auto’ for automatic version selection. Default: |
|
Option to build images before starting services. Choices:
|
|
Path to the CA certificate for server verification. |
|
Path to the client’s TLS certificate for Docker communication. |
|
Path to the client’s TLS key for Docker communication. |
|
Inline Docker Compose configuration, defined as a multi-line YAML string. Default: |
|
Enable or disable debug mode. Choices:
|
|
Include or exclude linked services. Choices:
|
|
Full path to the Docker Compose project directory. Default: |
|
Base path for Docker Compose configuration files. Default: |
|
Docker host URL or Unix socket path for API connection. Default: |
|
Custom path to an environment file. |
|
List of Compose file names to override the default docker-compose.yml. |
|
Check Docker daemon’s hostname against client certificate. Choices:
|
|
Control the use of cache during image build. Choices:
|
|
List of Docker Compose packages to install, appending the version if specified. Default: |
|
List of profiles to enable when starting services. |
|
The name of the Docker Compose project, used in the full path construction. Default: |
|
Custom name for the Docker Compose project. |
|
Always pull images before starting the application. Choices:
|
|
Strategy for container recreation: ‘always’, ‘never’, or ‘smart’. Default: |
|
Option to remove images when state is ‘absent’. |
|
Remove containers for services not defined in the Compose file. Choices:
|
|
Remove data volumes when state is ‘absent’. Choices:
|
|
Restart all containers when state is ‘present’. Choices:
|
|
Dictionary defining service scaling. |
|
List of specific services to operate on. |
|
Specify a valid SSL version number for secure communication. |
|
Desired state of the Docker Compose project. Default: |
|
Stop all containers when state is ‘present’. Choices:
|
|
Timeout in seconds for container shutdown operations. |
|
Use TLS for API connection without verifying Docker host server’s authenticity. Choices:
|
|
Expected hostname of the Docker Host server for TLS verification. |
|
Flag to use a Docker Compose file (true) or inline configuration (false). Choices:
|
|
Flag to enable SSH client usage for Docker API communication. Choices:
|
|
Verify the Docker host server’s authenticity when using TLS. Choices:
|
|
The desired Docker Compose version. Leave empty for the latest version. Default: |