Closed smalenfant closed 3 months ago
I haven't noticed before but looks like there is also an issue with volume_binds.
- "volume_binds": null
+ "volume_binds": [
+ "/opt/ara:/opt/ara:rw"
+ ]
If I run that task multiple times with the latest version, I only get
TASK [Create ARA container] ******************************************************************************************************************************************************************
--- before
+++ after
@@ -1,4 +1,4 @@
{
- "restarted": false,
+ "restarted": true,
"running": true
}
changed: [localhost]
but always docker ps
shows the port:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2bcd2cb04274 recordsansible/ara-api:latest "bash -c '/usr/local…" 2 minutes ago Up 1 second 0.0.0.0:8000->8000/tcp ara
Also switching between community.docker 2.7.0, 3.7.0, and main
branch doesn't give different results for me.
We just went through this module with a different docker image (different host) and it worked fine as well. Would you know how I could debug this through docker? Seems like an API issue.
I wonder what kind of residual container issue this was. I just ran docker system prune -a
and re-run my playbook:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bddc41f7ded3 recordsansible/ara-api "bash -c '/usr/local…" 6 seconds ago Up 4 seconds 0.0.0.0:8000->8000/tcp ara
Solved. We can close this.
Just interesting on how the older module was always making it work. But not with the new one would break it.
Without being able to reproduce this I'm not able to tell you why.
I searched post, the only one I found was closed for lack of information.
I did not test on main branch or latest version (3.8.0) as I didn't see any commits related to this.
SUMMARY
When running with version 3.7.0 (ansible 9.2.0), ports are not exposed on the local host. It was working as expect on the 2.7.0 version (part of ansible 6.7.0).
ISSUE TYPE
COMPONENT NAME
docker_container
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Target host: Centos 7.9
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect
0.0.0.0:8000
to show in the resultsACTUAL RESULTS
Service is unreachable
Second pass with module 3.7.0 (It shows the proper diffs, just not applied):