Skip to content

Revert Docker module workarounds when community.docker PR #861 is available #2

@pledou

Description

@pledou

Problem

We had to replace community.docker.docker_container_exec and community.docker.docker_prune modules with direct docker command calls due to Docker connection errors:

Error connecting: Error while fetching server API version: Not supported URL scheme http+docker

Root Cause

The issue is fixed upstream but waiting for the fix to be available in Ubuntu distribution:

Files Changed

1. playbooks/roles/nextcloud/tasks/main.yml

Replaced community.docker.docker_container_exec with ansible.builtin.command using docker exec:

  • First setup nextcloud
  • Set nextcloud system config.php values
  • Configure apps config values
  • Update apps & Add missing db objects

2. playbooks/install.yml

Replaced community.docker.docker_prune with ansible.builtin.command using docker system prune

Action Required

Once PR #861 is available in Ubuntu's ansible community.docker collection package:

  1. Revert changes in playbooks/roles/nextcloud/tasks/main.yml to use community.docker.docker_container_exec
  2. Revert changes in playbooks/install.yml to use community.docker.docker_prune

Check if Fixed

ansible-galaxy collection list | grep community.docker
dpkg -l | grep ansible

Verify the version includes the fix from PR #861.

Notes

Current workaround is functional but less idempotent and has less structured error handling than the native Ansible modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions