robertdebock.docker_compose
Ansible Role: Docker Compose
This guide helps you install Docker Compose using Ansible.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here’s a basic example of how to use this role, which is taken from molecule/default/converge.yml
:
---
- name: Install Docker Compose
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.docker_compose
Before running this playbook, you need to prepare your machine. In CI environments, this is done using molecule/default/prepare.yml
:
---
- name: Prepare the system
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
For a more detailed explanation, check out this full guide.
Role Variables
Default values for the variables are set in defaults/main.yml
:
---
# Default settings for Docker Compose
# The version of Docker Compose to install.
# Versions `1.*` do not start with `v`, while `2.*` do.
# You can find available versions here:
# https://github.com/docker/compose/releases
docker_compose_version: "v2.24.1"
# URL to download the Docker Compose binary.
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-{{ ansible_system | lower }}-{{ docker_compose_architecture }}"
Requirements
- Install pip packages listed in requirements.txt.
Used Roles
Several roles are used to prepare your system. You can choose different methods if you prefer.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
Context
This role is part of a group of compatible roles. Visit the documentation for more information.
Related roles overview:
Compatibility
This role has been tested on the following container images:
Container | Tags |
---|---|
Alpine | all |
Amazon | Candidate |
EL | 9 |
Debian | all |
Fedora | all |
Ubuntu | all |
The minimum required version of Ansible is 2.12, and tests have been done on:
- The last version
- The current version
- The development version
If you encounter any issues, please report them on GitHub.
License
This role is licensed under Apache-2.0.
Author Information
Created by robertdebock.
Consider sponsoring me.
ansible-galaxy install robertdebock.docker_compose