You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
community.docker.docker_compose module fails to start service when 'deploy.resources.limits.pids' is defined. The same compose service starts when using the 'docker compose' CLI (Docker Compose version v2.16.0).
Ansible error message: fatal: [instance]: FAILED! => {"changed": false, "msg": "Configuration error - The Compose file 'redacted' is invalid because:\nservices.consensus.deploy.resources.limits value 'pids' does not match any of the regexes: '^x-'"}``
`
`fatal: [instance]: FAILED! => {"changed": false, "msg": "Configuration error - The Compose file 'redacted' is invalid because:\nservices.consensus.deploy.resources.limits value 'pids' does not match any of the regexes: '^x-'"}``
The text was updated successfully, but these errors were encountered:
This might be because docker-compose 1.x does not support this in Docker Compose definitions. Did you check whether your definition works with the docker-compose 1.x CLI?
SUMMARY
community.docker.docker_compose module fails to start service when 'deploy.resources.limits.pids' is defined. The same compose service starts when using the 'docker compose' CLI (Docker Compose version v2.16.0).
Please see docker documentation for reference -> https://docs.docker.com/compose/compose-file/deploy/#resources
Relevant docker compose file section:
Ansible error message:
fatal: [instance]: FAILED! => {"changed": false, "msg": "Configuration error - The Compose file 'redacted' is invalid because:\nservices.consensus.deploy.resources.limits value 'pids' does not match any of the regexes: '^x-'"}``
ISSUE TYPE
COMPONENT NAME
community.docker.docker_compose
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Management Host: Ubuntu 22.04
Target hosts: tested on Ubuntu 22.04 and Almalinux9
STEPS TO REPRODUCE
include below section in a compose file and deploy using Ansible
EXPECTED RESULTS
Compose stack starts.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: