Comments (2)
@dchats1 can you please write playbooks that you run to test and how to reproduce the issue? You can run ansible-playbook --diff to see the difference in containers, no need to print from function. So workdir
is not "/" by default for your case? Please submit output of "--diff" and inspect for container.
If I understand the issue correct, we'll need to remove workdir
from defaults.
from ansible-podman-collections.
@sshnaidm I wasn't aware of the --diff flag, that accomplishes exactly what I was looking for, thank you!
In the case of the quay.io/prometheus/prometheus container the workdir
set by the container is /prometheus. Here is the task and the output from --diff:
- name: Run Prometheus Container
containers.podman.podman_container:
name: prometheus
image: quay.io/prometheus/prometheus:v2.17.1
network: host
volume:
- /opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /opt/prometheus/data:/prometheus
state: started
--- before
+++ after
@@ -1 +1 @@
-workdir - /prometheus
+workdir - /
Adding workdir: /prometheus
to the task fixes that.
I don't think the workdir needs to be removed from the defaults, but it might be helpful to have an extra flag that lets the module ignore params that aren't set by the user. Maybe something like this:
dchats1@56922b7
from ansible-podman-collections.
Related Issues (20)
- Not idemponent when port is bound to `0.0.0.0` HOT 2
- Alias parameters "stop_timeout" and "time" for podman generate systemd HOT 3
- rootless always want to change the user HOT 3
- Incorrect documentation for `podman_image_info` return value HOT 1
- containers.podman.podman_secret fails if identical secret was create in playbook before HOT 1
- podman_network not idempotent when disable_dns is explicitly set
- No values returned from podman_container_exec on failures HOT 3
- `AttributeError: 'list' object has no attribute 'get'` trying to use collection on recent Fedora (podman 5.0?) HOT 2
- Env in container exec are wrongly double quoted HOT 2
- podman_container: pasta network breaks idempotency
- podman_login: why are tlsverify certdir mutually exclusive? HOT 6
- podman_pod_info raises JSONDecodeError for non-existant pod HOT 3
- Pushing an image with `/` in the name to a remote registry does not work HOT 4
- Issues pulling images with similar tags (cannot pull one with a shorter left substring than a pre-existing image) HOT 2
- podman network: support for "--route" option HOT 1
- podman_container: support for "--pull" option HOT 4
- Absent state with quadlet should remove quadlet file as well as podman resource. HOT 1
- Wrong Podman Secret Creation Behavior HOT 3
- Support shm-size when specifying a pod
- Pod not idemponent when port is bound to 0.0.0.0/ maybe same as issue #679
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-podman-collections.