Skip to content

Add docker-compose plugin support for openSUSE/SLES - #541

Open
floh96 wants to merge 1 commit into
geerlingguy:masterfrom
floh96:feat/suse-docker-compose-plugin
Open

Add docker-compose plugin support for openSUSE/SLES#541
floh96 wants to merge 1 commit into
geerlingguy:masterfrom
floh96:feat/suse-docker-compose-plugin

Conversation

@floh96

@floh96 floh96 commented Apr 13, 2026

Copy link
Copy Markdown

Summary

On SLES/openSUSE, the Compose v2 CLI plugin is distributed as the `docker-compose` package (via openSUSE OBS `Virtualization:/containers`), not `docker-compose-plugin` as on Debian/Ubuntu systems. The package installs the binary to `/usr/lib/docker/cli-plugins/`, making `docker compose` available as a Docker CLI subcommand.

Previously, `Suse` was explicitly excluded from both compose plugin installation tasks in `tasks/main.yml`, so `docker_install_compose_plugin: true` had no effect on SLES/openSUSE.

Changes

  • `vars/Suse.yml`: sets `docker_compose_package: docker-compose` to override the Debian/Ubuntu default of `docker-compose-plugin`
  • `tasks/setup-Suse.yml`: adds a dedicated compose plugin install task using `ansible.legacy.zypper` with `changed_when: false`
  • `tasks/main.yml`: keeps `Suse` in the exclusion list — the generic `package` module with zypper incorrectly reports `changed` even when the package is already installed, breaking idempotency; the dedicated task in `setup-Suse.yml` handles this instead

Testing

Verified on SLES 15 SP7 — `docker compose version` returns `Docker Compose version 2.22.0` after installation. Idempotent on re-run (no spurious `changed`).

🤖 Generated with Claude Code

On SLES/openSUSE, the Compose v2 CLI plugin is distributed as the
'docker-compose' package (via openSUSE OBS Virtualization:containers),
not 'docker-compose-plugin' as on Debian/Ubuntu systems. The package
installs the binary to /usr/lib/docker/cli-plugins/, making 'docker
compose' available as a Docker CLI subcommand.

Two changes:
- vars/Suse.yml: set docker_compose_package to 'docker-compose'
- tasks/main.yml: remove 'Suse' from the exclusion list in the
  'Install docker-compose plugin' task, so SUSE uses the generic
  package task (without allow_downgrade, which zypper does not
  support). This mirrors the existing pattern for docker_packages
  installation (lines 22-37).
@floh96
floh96 force-pushed the feat/suse-docker-compose-plugin branch from 39da67b to bec6dc9 Compare April 13, 2026 09:37
@floh96

floh96 commented Apr 13, 2026

Copy link
Copy Markdown
Author

@geerlingguy Could you please review?
I tested the change on SLES 15 SP7 server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant