Code Monkey home page Code Monkey logo

Comments (3)

sshnaidm avatar sshnaidm commented on June 20, 2024

@SvenVD can you please paste a task you run? And would be great to see a log with running -vvvv

from ansible-podman-collections.

sshnaidm avatar sshnaidm commented on June 20, 2024

If I'm right and you set explicitly env: {} in task, then it explains this behavior. But I don't understand why to set env: {} and what is the reasoning behind this.

from ansible-podman-collections.

SvenVD avatar SvenVD commented on June 20, 2024

The task is

- name: podman_rootless | Configure and download {{ podman_rootless_container_image }} container to run under user  {{ podman_rootless_user }}
  containers.podman.podman_container:
    name: "{{ podman_rootless_hostname }}"
    image: "{{ podman_rootless_container_image }}"
    #We will start it with the generated systemd file
    state: present
    ipc: "private"
    #We do not need to force recreating all the time
    #recreate: yes
    ports: "{{ podman_rootless_ports }}"
    hostname: "{{ podman_rootless_hostname }}"
    env: "{{ podman_rootless_env }}"
    volume: "{{ podman_rootless_volume }}"
    userns: "{{ podman_rootless_userns }}"
    #https://docs.podman.io/en/latest/markdown/podman-generate-systemd.1.html
    generate_systemd:
      path: /home/{{ podman_rootless_user }}/.config/systemd/user
      restart_policy: on-failure
      time: 120
      names: true
  become_user: "{{ podman_rootless_user }}"
  register: podman_rootless_configure_and_download_result

and it and other tasks in the role gets called by

- name: app_containerx | manage container
  include_role:
    name: podman
    tasks_from: rootless_container
  vars: 
    podman_rootless_user: "user"
    ... and so on 

podman_rootless_env is optional in the latter and not passed in this example, but in defaults/main.yml we set it to podman_rootless_env: {} if it is not overwritten by the include_role vars.

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.