Skip to content

Commit

Permalink
Add compose (#15)
Browse files Browse the repository at this point in the history
* Add docker-compose installation

* Add docker_compose_version parameter description
  • Loading branch information
maricaantonacci authored Dec 3, 2021
1 parent 33061d0 commit 022bda2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Docker Role
=========

Install docker-engine
Install docker-engine and optionally docker-compose

Role Variables
--------------
Expand All @@ -15,6 +15,7 @@ Role Variables
- `docker_log_driver` (optional): Log driver to use. Default: 'json-file'
- `docker_logs_opts` (optional): Log driver options. Default: { 'max-file': '3', 'max-size': '100m' }
- `docker_pip_package` (optional): The name of the packge to install to get pip on the system. For older systems that don't have Python 3 available, you can set this to `python-pip`. Default: `python3-pip`
- `docker_compose_version` (optional): if provided, docker-compose will be installed with the requested version. Default: "", i.e. docker-compose is not installed by default.

Dependencies
--------------
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ docker_options:
storage-driver : "{{ docker_storage_driver |default(None) }}"
log-driver: "{{ docker_log_driver |default('json-file') }}"
log-opts: "{{ docker_logs_opts |default( { 'max-file': '3', 'max-size': '100m' } ) }}"
docker_compose_version: ""



4 changes: 4 additions & 0 deletions tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@

- name: "Configure docker"
include: configure.yml

- name: "Install compose"
pip: name="docker-compose" state="present" version="{{ docker_compose_version }}"
when: docker_compose_version != ""

0 comments on commit 022bda2

Please sign in to comment.