Code Monkey home page Code Monkey logo

Comments (2)

sshnaidm avatar sshnaidm commented on May 24, 2024

@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.

dchats1 avatar dchats1 commented on May 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.