SUMMARY
ISSUE TYPE
COMPONENT NAME
community.docker.docker_compose_v2
ANSIBLE VERSION
ansible [core 2.19.4]
config file = ./ansible/ansible.cfg
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /nix/store/90jiynl0ah5z92p41xg4n2vbkdqayfci-python3.13-ansible-core-2.19.4/lib/python3.13/site-packages/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = /nix/store/90jiynl0ah5z92p41xg4n2vbkdqayfci-python3.13-ansible-core-2.19.4/bin/ansible
python version = 3.13.9 (main, Oct 14 2025, 13:52:31) [Clang 21.1.2 ] (/nix/store/hv7qldswrqvg1sjys1lmgjg875hkffng-python3-3.13.9/bin/python3.13)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)
COLLECTION VERSION
Collection Version
---------------- -------
community.docker 5.0.3
CONFIGURATION
CONFIG_FILE() = ./ansible/ansible.cfg
DEFAULT_HOST_LIST(./ansible/ansible.cfg) = ['./ansible/inventory.yaml']
DEFAULT_ROLES_PATH(./ansible/ansible.cfg) = ['./ansible/roles']
EDITOR(env: EDITOR) = nvim
GALAXY_SERVERS:
OS / ENVIRONMENT
Remote host: Rocky Linux 10.0 (Red Quartz) - x86_64
Ansible host: macOS 26.1 - Apple M3
STEPS TO REPRODUCE
- name: Run docker-compose.yaml
community.docker.docker_compose_v2:
project_src: /opt/vault_agent
state: "present"
services:
vault-agent:
image: hashicorp/vault:1.21
restart: always
EXPECTED RESULTS
call_cli_json should not fail if stdout doesn't contain data.
ACTUAL RESULTS
TASK [vault_agent : Run docker-compose.yaml] ***********************************
[ERROR]: Task failed: Module failed: Error while parsing JSON output of /usr/bin/docker --host unix:///var/run/docker.sock compose --ansi never --progress json --project-directory /opt/vault_agent images --format json: Expecting value: line 1 column 1 (char 0)
fatal: [1.2.3.4]: FAILED! => {"changed": false, "msg": "Error while parsing JSON output of /usr/bin/docker --host unix:///var/run/docker.sock compose --ansi never --progress json --project-directory /opt/vault_agent images --format json: Expecting value: line 1 column 1 (char 0)\nJSON output: "}
Command used to debug behavior:
/usr/bin/docker --host unix:///var/run/docker.sock compose --ansi never --progress json --project-directory /opt/vault_agent images --format json > /tmp/stdout 2> /tmp/stderr
/tmp/stdout (empty file):
/tmp/stderr:
{"error":true,"message":"Error response from daemon: image with reference hashicorp/vault:1.21 was found but does not provide the specified platform (linux/amd64)"}
Possibly relevant code:
SUMMARY
ISSUE TYPE
COMPONENT NAME
community.docker.docker_compose_v2
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Remote host: Rocky Linux 10.0 (Red Quartz) - x86_64
Ansible host: macOS 26.1 - Apple M3
STEPS TO REPRODUCE
EXPECTED RESULTS
call_cli_jsonshould not fail if stdout doesn't contain data.ACTUAL RESULTS
Command used to debug behavior:
/tmp/stdout (empty file):
/tmp/stderr:
Possibly relevant code: