haxorof/ansible-role-docker-ce

Add support to upgrade/downgrade docker-compose (binary version)

haxorof opened this issue · 0 comments

Today the role install the binary version of docker-compose if docker_compose_no_pip is set to true. Once installed it will not try to install it again because it skip those tasks if it finds the docker-compose file in the system.

Version Information

Role: 3.3.2

Actual Behavior

  1. Run role with following variables:
docker_compose: true
docker_compose_no_pip: true
docker_compose_no_pip_detect_version: false
docker_compose_no_pip_version: 1.29.1
  1. Check docker compose version by running docker-compose --version and you will see 1.29.1 is installed.
  2. Run role again but change docker_compose_no_pip_version to 1.29.2
  3. Check docker compose version by running docker-compose --version and you will see still see 1.29.1 is installed.

New/Changed Behavior

  1. Run role with following variables:
docker_compose: true
docker_compose_no_pip: true
docker_compose_no_pip_detect_version: false
docker_compose_no_pip_version: 1.29.1
  1. Check docker compose version by running docker-compose --version and you will see 1.29.1 is installed.
  2. Run role again but change docker_compose_no_pip_version to 1.29.2
  3. Check docker compose version by running docker-compose --version and you will see see 1.29.2 is installed.