Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection/podman.py broken on F34 #240

Closed
JayDoubleu opened this issue Apr 5, 2021 · 10 comments
Closed

connection/podman.py broken on F34 #240

JayDoubleu opened this issue Apr 5, 2021 · 10 comments

Comments

@JayDoubleu
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description
Unable to use podman connection on F34 operation not permitted

Steps to reproduce the issue:

  1. Run any command with podman connection

Describe the results you received:

Every play fails with not permitted error

Additional information you deem important (e.g. issue happens only occasionally):

Version of the containers.podman collection:
1.5.0
1.4.4

Either git commit if installed from git: git show --summary
Or version from ansible-galaxy if installed from galaxy: ansible-galaxy collection list | grep containers.podman

containers.podman             1.4.4  

Output of ansible --version:

[jaydoubleu@fedora provision]$ ansible --version
ansible 2.10.7
  config file = None
  configured module search path = ['/var/home/jaydoubleu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible
  executable location = /var/home/jaydoubleu/.local/bin/ansible
  python version = 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)]

Output of podman version:

[jaydoubleu@fedora provision]$ podman version
Version:      3.1.0
API Version:  3.1.0
Go Version:   go1.16
Built:        Tue Mar 30 14:29:36 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

[jaydoubleu@fedora provision]$ podman info --debug
host:
  arch: amd64
  buildahVersion: 1.20.0
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.27-1.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 24
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: thinkD
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.11.11-300.fc34.x86_64
  linkmode: dynamic
  memFree: 24894107648
  memTotal: 33655726080
  ociRuntime:
    name: crun
    package: crun-0.18-5.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.18
      commit: 808420efe3dc2b44d6db9f1a3fac8361dde42a95
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    selinuxEnabled: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc34.x86_64
    version: |-
      slirp4netns version 1.1.8+dev
      commit: 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 1h 44m 6.35s (Approximately 0.04 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /var/home/jaydoubleu/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.2
        fuse-overlayfs: version 1.5
        FUSE library version 3.10.2
        using FUSE kernel interface version 7.31
  graphRoot: /var/home/jaydoubleu/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 2
  runRoot: /run/user/1000/containers
  volumePath: /var/home/jaydoubleu/.local/share/containers/storage/volumes
version:
  APIVersion: 3.1.0
  Built: 1617110976
  BuiltTime: Tue Mar 30 14:29:36 2021
  GitCommit: ""
  GoVersion: go1.16
  OsArch: linux/amd64
  Version: 3.1.0

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.1.0-1.fc34.x86_64

Playbok you run with ansible (e.g. content of playbook.yaml):

- hosts: toolbox
  connection: podman
  tasks:
  - name: Run tasks inside toolbox containers
    import_tasks: "{{ playbook_dir }}/toolbox/main.yaml"
    tags: ["toolbox"]

Command line and output of ansible run with high verbosity

Please NOTE: if you submit a bug about idempotency, run the playbook with --diff option, like:

ansible-playbook -i inventory --diff -vv playbook.yml

PLAY [toolbox] ******************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
task path: /var/mnt/media_share/silverblue/provision/main.yaml:18
redirecting (type: connection) ansible.builtin.podman to containers.podman.podman
Using podman connection from collection
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'mount', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa']
STDOUT b''
STDERR b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first\n'
RC CODE 125
Failed to mount container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first'
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'exec', b'--user', b'jaydoubleu', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /var/tmp/.ansible/ `"&& mkdir "` echo /var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756 `" && echo ansible-tmp-1617657142.8458905-40767-113599756835756="` echo /var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756 `" ) && sleep 0']
STDOUT b'ansible-tmp-1617657142.8458905-40767-113599756835756=/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756\n'
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
Using module file /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> PUT /var/home/jaydoubleu/.ansible/tmp/ansible-local-40282lf1_g4f7/tmpdvwlj6w6 TO /var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'cp', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-40282lf1_g4f7/tmpdvwlj6w6', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa:/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\n'
RC CODE 125
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'cp', b'--pause=false', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-40282lf1_g4f7/tmpdvwlj6w6', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa:/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\n'
RC CODE 125
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'exec', b'--user', b'jaydoubleu', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa', b'/bin/sh', b'-c', b'rm -f -r /var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/ > /dev/null 2>&1 && sleep 0']
STDOUT b''
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
fatal: [toolbox-default]: FAILED! => {
    "msg": "Failed to copy file from /var/home/jaydoubleu/.ansible/tmp/ansible-local-40282lf1_g4f7/tmpdvwlj6w6 to /var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py in container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa\nb'Error: \"/var/tmp/.ansible/ansible-tmp-1617657142.8458905-40767-113599756835756/AnsiballZ_setup.py\" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\\n'"
}

Additional environment details (AWS, VirtualBox, physical, etc.):

Fedora Silverblue 34

Managed to get past podman unshare error by altering podman.py with:

        if cmd == "mount":
            local_cmd = ["/usr/bin/podman", "unshare"] + [podman_cmd]
        else:
           local_cmd = [podman_cmd]

However it sill fails with below:

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
task path: /var/mnt/media_share/silverblue/provision/main.yaml:18
redirecting (type: connection) ansible.builtin.podman to containers.podman.podman
Using podman connection from collection
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'unshare', b'/usr/bin/podman', b'mount', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa']
STDOUT b'/var/home/jaydoubleu/.local/share/containers/storage/overlay/56560ed7cb8b3a100a039f49be288a9af2f05fbd1456202384f5fdb2d45f7717/merged\n'
STDERR b''
RC CODE 0
Failed to mount container with CGroups2: empty dir b'/var/home/jaydoubleu/.local/share/containers/storage/overlay/56560ed7cb8b3a100a039f49be288a9af2f05fbd1456202384f5fdb2d45f7717/merged'
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'exec', b'--user', b'jaydoubleu', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /var/tmp/.ansible/ `"&& mkdir "` echo /var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156 `" && echo ansible-tmp-1617657660.6705902-43303-25166555817156="` echo /var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156 `" ) && sleep 0']
STDOUT b'ansible-tmp-1617657660.6705902-43303-25166555817156=/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156\n'
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
Using module file /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> PUT /var/home/jaydoubleu/.ansible/tmp/ansible-local-42816k8dpf0at/tmpani6hrvv TO /var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'cp', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-42816k8dpf0at/tmpani6hrvv', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa:/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\n'
RC CODE 125
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'cp', b'--pause=false', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-42816k8dpf0at/tmpani6hrvv', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa:/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\n'
RC CODE 125
<a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa> RUN [b'/usr/bin/podman', b'exec', b'--user', b'jaydoubleu', b'a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa', b'/bin/sh', b'-c', b'rm -f -r /var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/ > /dev/null 2>&1 && sleep 0']
STDOUT b''
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
fatal: [toolbox-default]: FAILED! => {
    "msg": "Failed to copy file from /var/home/jaydoubleu/.ansible/tmp/ansible-local-42816k8dpf0at/tmpani6hrvv to /var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py in container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa\nb'Error: \"/var/tmp/.ansible/ansible-tmp-1617657660.6705902-43303-25166555817156/AnsiballZ_setup.py\" could not be found on container a95635f1fc42ccf88c1b9eb269a7b9e417cd350a0f0afd5273a858efc2c2b9aa: operation not permitted\\n'"
}


@sshnaidm
Copy link
Member

sshnaidm commented Apr 5, 2021

Yeah, it's probably best to start using unshare here.

@JayDoubleu
Copy link
Author

Any way to temporarily make it work ? Tried replacing local_cmd = [podman_cmd] with local_cmd = ["/usr/bin/podman", "unshare"] + [podman_cmd] entirely but no luck.

@sshnaidm
Copy link
Member

sshnaidm commented Apr 6, 2021

@JayDoubleu can you please provide a task that actually fails? It's not clear from the issue. Trying to reproduce now.

@sshnaidm
Copy link
Member

sshnaidm commented Apr 6, 2021

@JayDoubleu please make sure you use actual collection with connection: containers.podman.podman:

- hosts: toolbox
  connection: containers.podman.podman
  gather_facts: true
  vars:
    ansible_python_interpreter: /usr/local/bin/python
  tasks:

    - name: Run tasks inside toolbox containers
      template:
        src: /tmp/aaa.j2
        dest: ~/somefile1

This works for me in f34.

@JayDoubleu
Copy link
Author

JayDoubleu commented Apr 6, 2021

It doesn't even get to tasks, it fails at gathering facts.
Also, on SB F34 /usr/local/bin/python doesn't exist.

# podman ps
#CONTAINER ID  IMAGE                                         COMMAND               CREATED       STATUS                PORTS   NAMES
#a95635f1fc42  registry.fedoraproject.org/fedora-toolbox:34  toolbox --verbose...  20 hours ago  Up About an hour ago          fedora-toolbox-34

- hosts: localhost
  connection: local
  tasks:
  - name: Add toolbox as ansible host
    add_host:
      name: toolbox-default
      ansible_host: "a95635f1fc42"
      groups: toolbox
    changed_when: false

- hosts: toolbox
  connection: containers.podman.podman
  gather_facts: true
  vars:
    ansible_python_interpreter: /usr/local/bin/python
  tasks:
    - name: Run tasks inside toolbox containers
      template:
        src: /tmp/aaa.j2
        dest: ~/somefile1
[jaydoubleu@thinkD provision]$ ansible-playbook test.yaml -vvvvv
ansible-playbook 2.10.7
  config file = None
  configured module search path = ['/var/home/jaydoubleu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible
  executable location = /var/home/jaydoubleu/.local/bin/ansible-playbook
  python version = 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin default of type stdout, v2.0 from /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/plugins/callback/default.py
Attempting to use 'default' callback.
Skipping callback 'default', as we already have a stdout callback.
Attempting to use 'junit' callback.
Attempting to use 'minimal' callback.
Skipping callback 'minimal', as we already have a stdout callback.
Attempting to use 'oneline' callback.
Skipping callback 'oneline', as we already have a stdout callback.
Attempting to use 'tree' callback.

PLAYBOOK: test.yaml ***********************************************************************************************************************************************************************************************************************************************************************************************
Positional arguments: test.yaml
verbosity: 5
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
2 plays in test.yaml

PLAY [localhost] **************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************************************************
task path: /var/mnt/media_share/silverblue/provision/test.yaml:5
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jaydoubleu
<127.0.0.1> EXEC /bin/sh -c 'echo ~jaydoubleu && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/home/jaydoubleu/.ansible/tmp `"&& mkdir "` echo /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092 `" && echo ansible-tmp-1617723549.5886698-12455-28350298444092="` echo /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092 `" ) && sleep 0'
Including module_utils file ansible/__init__.py
Including module_utils file ansible/module_utils/__init__.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/__init__.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/__init__.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/__init__.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/distro/__init__.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/facts/ansible_collector.py
Including module_utils file ansible/module_utils/facts/__init__.py
Including module_utils file ansible/module_utils/facts/collector.py
Including module_utils file ansible/module_utils/facts/compat.py
Including module_utils file ansible/module_utils/facts/default_collectors.py
Including module_utils file ansible/module_utils/facts/hardware/aix.py
Including module_utils file ansible/module_utils/facts/hardware/__init__.py
Including module_utils file ansible/module_utils/facts/hardware/base.py
Including module_utils file ansible/module_utils/facts/hardware/darwin.py
Including module_utils file ansible/module_utils/facts/hardware/dragonfly.py
Including module_utils file ansible/module_utils/facts/hardware/freebsd.py
Including module_utils file ansible/module_utils/facts/hardware/hpux.py
Including module_utils file ansible/module_utils/facts/hardware/hurd.py
Including module_utils file ansible/module_utils/facts/hardware/linux.py
Including module_utils file ansible/module_utils/facts/hardware/netbsd.py
Including module_utils file ansible/module_utils/facts/hardware/openbsd.py
Including module_utils file ansible/module_utils/facts/hardware/sunos.py
Including module_utils file ansible/module_utils/facts/namespace.py
Including module_utils file ansible/module_utils/facts/network/aix.py
Including module_utils file ansible/module_utils/facts/network/__init__.py
Including module_utils file ansible/module_utils/facts/network/base.py
Including module_utils file ansible/module_utils/facts/network/darwin.py
Including module_utils file ansible/module_utils/facts/network/dragonfly.py
Including module_utils file ansible/module_utils/facts/network/fc_wwn.py
Including module_utils file ansible/module_utils/facts/network/freebsd.py
Including module_utils file ansible/module_utils/facts/network/generic_bsd.py
Including module_utils file ansible/module_utils/facts/network/hpux.py
Including module_utils file ansible/module_utils/facts/network/hurd.py
Including module_utils file ansible/module_utils/facts/network/iscsi.py
Including module_utils file ansible/module_utils/facts/network/linux.py
Including module_utils file ansible/module_utils/facts/network/netbsd.py
Including module_utils file ansible/module_utils/facts/network/nvme.py
Including module_utils file ansible/module_utils/facts/network/openbsd.py
Including module_utils file ansible/module_utils/facts/network/sunos.py
Including module_utils file ansible/module_utils/facts/other/facter.py
Including module_utils file ansible/module_utils/facts/other/__init__.py
Including module_utils file ansible/module_utils/facts/other/ohai.py
Including module_utils file ansible/module_utils/facts/sysctl.py
Including module_utils file ansible/module_utils/facts/system/apparmor.py
Including module_utils file ansible/module_utils/facts/system/__init__.py
Including module_utils file ansible/module_utils/facts/system/caps.py
Including module_utils file ansible/module_utils/facts/system/chroot.py
Including module_utils file ansible/module_utils/facts/system/cmdline.py
Including module_utils file ansible/module_utils/facts/system/date_time.py
Including module_utils file ansible/module_utils/facts/system/distribution.py
Including module_utils file ansible/module_utils/facts/system/dns.py
Including module_utils file ansible/module_utils/facts/system/env.py
Including module_utils file ansible/module_utils/facts/system/fips.py
Including module_utils file ansible/module_utils/facts/system/local.py
Including module_utils file ansible/module_utils/facts/system/lsb.py
Including module_utils file ansible/module_utils/facts/system/pkg_mgr.py
Including module_utils file ansible/module_utils/facts/system/platform.py
Including module_utils file ansible/module_utils/facts/system/python.py
Including module_utils file ansible/module_utils/facts/system/selinux.py
Including module_utils file ansible/module_utils/facts/system/service_mgr.py
Including module_utils file ansible/module_utils/facts/system/ssh_pub_keys.py
Including module_utils file ansible/module_utils/facts/system/user.py
Including module_utils file ansible/module_utils/facts/timeout.py
Including module_utils file ansible/module_utils/facts/utils.py
Including module_utils file ansible/module_utils/facts/virtual/base.py
Including module_utils file ansible/module_utils/facts/virtual/__init__.py
Including module_utils file ansible/module_utils/facts/virtual/dragonfly.py
Including module_utils file ansible/module_utils/facts/virtual/freebsd.py
Including module_utils file ansible/module_utils/facts/virtual/hpux.py
Including module_utils file ansible/module_utils/facts/virtual/linux.py
Including module_utils file ansible/module_utils/facts/virtual/netbsd.py
Including module_utils file ansible/module_utils/facts/virtual/openbsd.py
Including module_utils file ansible/module_utils/facts/virtual/sunos.py
Including module_utils file ansible/module_utils/facts/virtual/sysctl.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py
Using module file /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /var/home/jaydoubleu/.ansible/tmp/ansible-local-12452n4wy4w54/tmpulep4zox TO /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092/ /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723549.5886698-12455-28350298444092/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers

TASK [Add toolbox as ansible host] ********************************************************************************************************************************************************************************************************************************************************************************
task path: /var/mnt/media_share/silverblue/provision/test.yaml:8
creating host via 'add_host': hostname=toolbox-default
ok: [localhost] => {
    "add_host": {
        "groups": [
            "toolbox"
        ],
        "host_name": "toolbox-default",
        "host_vars": {
            "ansible_host": "a95635f1fc42"
        }
    },
    "changed": false
}
META: ran handlers
META: ran handlers

PLAY [toolbox] ****************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************************************************
task path: /var/mnt/media_share/silverblue/provision/test.yaml:15
Loading collection containers.podman from /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible_collections/containers/podman
Using podman connection from collection
<a95635f1fc42> RUN [b'/usr/bin/podman', b'mount', b'a95635f1fc42']
STDOUT b''
STDERR b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first\n'
RC CODE 125
Failed to mount container a95635f1fc42: b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first'
<a95635f1fc42> RUN [b'/usr/bin/podman', b'exec', b'a95635f1fc42', b'/bin/sh', b'-c', b'echo ~ && sleep 0']
STDOUT b'/root\n'
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
<a95635f1fc42> RUN [b'/usr/bin/podman', b'exec', b'a95635f1fc42', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950 `" && echo ansible-tmp-1617723551.5628214-12537-123414022106950="` echo /root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950 `" ) && sleep 0']
STDOUT b'ansible-tmp-1617723551.5628214-12537-123414022106950=/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950\n'
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
Using module file /var/home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<a95635f1fc42> PUT /var/home/jaydoubleu/.ansible/tmp/ansible-local-12452n4wy4w54/tmpwelta722 TO /root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py
<a95635f1fc42> RUN [b'/usr/bin/podman', b'cp', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-12452n4wy4w54/tmpwelta722', b'a95635f1fc42:/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py" could not be found on container a95635f1fc42: operation not permitted\n'
RC CODE 125
<a95635f1fc42> RUN [b'/usr/bin/podman', b'cp', b'--pause=false', b'/var/home/jaydoubleu/.ansible/tmp/ansible-local-12452n4wy4w54/tmpwelta722', b'a95635f1fc42:/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py']
STDOUT b''
STDERR b'Error: "/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py" could not be found on container a95635f1fc42: operation not permitted\n'
RC CODE 125
<a95635f1fc42> RUN [b'/usr/bin/podman', b'exec', b'a95635f1fc42', b'/bin/sh', b'-c', b'rm -f -r /root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/ > /dev/null 2>&1 && sleep 0']
STDOUT b''
STDERR b''
RC CODE 0
STDOUT b'' STDERR b''
fatal: [toolbox-default]: FAILED! => {
    "msg": "Failed to copy file from /var/home/jaydoubleu/.ansible/tmp/ansible-local-12452n4wy4w54/tmpwelta722 to /root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py in container a95635f1fc42\nb'Error: \"/root/.ansible/tmp/ansible-tmp-1617723551.5628214-12537-123414022106950/AnsiballZ_setup.py\" could not be found on container a95635f1fc42: operation not permitted\\n'"
}

PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
toolbox-default            : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

On F33 on the other hand running below:

- hosts: localhost
  connection: local
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:
  - name: Add toolbox as ansible host
    add_host:
      name: toolbox-default
      ansible_host: "783b054ce541"
      groups: toolbox
    changed_when: false

- hosts: toolbox
  connection: containers.podman.podman
  gather_facts: true
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:
    - name: Run tasks inside toolbox containers
      template:
        src: /tmp/aaa.j2
        dest: ~/somefile1

Returns:

ansible-playbook test.yaml -vvvv
ansible-playbook 2.10.4
  config file = None
  configured module search path = ['/home/jaydoubleu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible
  executable location = /home/jaydoubleu/.local/bin/ansible-playbook
  python version = 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin default of type stdout, v2.0 from /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: test.yaml ***********************************************************************************************************************************************************************************************************************************************************************************************
Positional arguments: test.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
2 plays in test.yaml

PLAY [localhost] **************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************************************************
task path: /tmp/test.yaml:1
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jaydoubleu
<127.0.0.1> EXEC /bin/sh -c 'echo ~jaydoubleu && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jaydoubleu/.ansible/tmp `"&& mkdir "` echo /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428 `" && echo ansible-tmp-1617723923.6419356-35333-264927496744428="` echo /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428 `" ) && sleep 0'
Using module file /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmpi1vhlqo_ TO /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428/ /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jaydoubleu/.ansible/tmp/ansible-tmp-1617723923.6419356-35333-264927496744428/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers

TASK [Add toolbox as ansible host] ********************************************************************************************************************************************************************************************************************************************************************************
task path: /tmp/test.yaml:6
creating host via 'add_host': hostname=toolbox-default
ok: [localhost] => {
    "add_host": {
        "groups": [
            "toolbox"
        ],
        "host_name": "toolbox-default",
        "host_vars": {
            "ansible_host": "783b054ce541"
        }
    },
    "changed": false
}
META: ran handlers
META: ran handlers

PLAY [toolbox] ****************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************************************************
task path: /tmp/test.yaml:13
Loading collection containers.podman from /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible_collections/containers/podman
Using podman connection from collection
<783b054ce541> RUN [b'/usr/bin/podman', b'mount', b'783b054ce541']
Failed to mount container 783b054ce541: b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first'
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'echo ~ && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930 `" && echo ansible-tmp-1617723925.753888-35434-280263662091930="` echo /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930 `" ) && sleep 0']
Using module file /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/setup.py
<783b054ce541> PUT /home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmpe4om4vj2 TO /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/AnsiballZ_setup.py
<783b054ce541> RUN [b'/usr/bin/podman', b'cp', b'/home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmpe4om4vj2', b'783b054ce541:/root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/AnsiballZ_setup.py']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'chmod u+x /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/ /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/AnsiballZ_setup.py && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/AnsiballZ_setup.py && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'rm -f -r /root/.ansible/tmp/ansible-tmp-1617723925.753888-35434-280263662091930/ > /dev/null 2>&1 && sleep 0']
ok: [toolbox-default]
META: ran handlers

TASK [Run tasks inside toolbox containers] ************************************************************************************************************************************************************************************************************************************************************************
task path: /tmp/test.yaml:19
Loading collection containers.podman from /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible_collections/containers/podman
Using podman connection from collection
<783b054ce541> RUN [b'/usr/bin/podman', b'mount', b'783b054ce541']
Failed to mount container 783b054ce541: b'Error: cannot run command "podman mount" in rootless mode, must execute `podman unshare` first'
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'echo ~ && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707 `" && echo ansible-tmp-1617723931.9358664-35867-198664859141707="` echo /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707 `" ) && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'echo ~ && sleep 0']
Using module file /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/stat.py
<783b054ce541> PUT /home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmpfjvcn5sr TO /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_stat.py
<783b054ce541> RUN [b'/usr/bin/podman', b'cp', b'/home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmpfjvcn5sr', b'783b054ce541:/root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_stat.py']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'chmod u+x /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/ /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_stat.py && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_stat.py && sleep 0']
<783b054ce541> PUT /home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmp0a2fyygi/aaa.j2 TO /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/source
<783b054ce541> RUN [b'/usr/bin/podman', b'cp', b'/home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmp0a2fyygi/aaa.j2', b'783b054ce541:/root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/source']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'chmod u+x /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/ /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/source && sleep 0']
Using module file /home/jaydoubleu/.local/lib/python3.9/site-packages/ansible/modules/copy.py
<783b054ce541> PUT /home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmplqm25w1d TO /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_copy.py
<783b054ce541> RUN [b'/usr/bin/podman', b'cp', b'/home/jaydoubleu/.ansible/tmp/ansible-local-35330pugkzc01/tmplqm25w1d', b'783b054ce541:/root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_copy.py']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'chmod u+x /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/ /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_copy.py && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/AnsiballZ_copy.py && sleep 0']
<783b054ce541> RUN [b'/usr/bin/podman', b'exec', b'783b054ce541', b'/bin/sh', b'-c', b'rm -f -r /root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/ > /dev/null 2>&1 && sleep 0']
changed: [toolbox-default] => {
    "changed": true,
    "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "dest": "/root/somefile1",
    "diff": [],
    "gid": 0,
    "group": "root",
    "invocation": {
        "module_args": {
            "_original_basename": "aaa.j2",
            "attributes": null,
            "backup": false,
            "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
            "content": null,
            "dest": "/root/somefile1",
            "directory_mode": null,
            "follow": false,
            "force": true,
            "group": null,
            "local_follow": null,
            "mode": null,
            "owner": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": "/root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/source",
            "unsafe_writes": false,
            "validate": null
        }
    },
    "md5sum": "d41d8cd98f00b204e9800998ecf8427e",
    "mode": "0644",
    "owner": "root",
    "size": 0,
    "src": "/root/.ansible/tmp/ansible-tmp-1617723931.9358664-35867-198664859141707/source",
    "state": "file",
    "uid": 0
}
META: ran handlers
META: ran handlers

PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
toolbox-default            : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   


@JayDoubleu
Copy link
Author

JayDoubleu commented Apr 6, 2021

@sshnaidm Interesting.. This seems to be toolbox related.

I just created a simple container with podman run -d -it ubuntu /bin/bash
And it works as expected !

Should I bother folks over @containers/toolbox?

@sshnaidm
Copy link
Member

sshnaidm commented Apr 6, 2021

@JayDoubleu yeah, it seems related to how you create the container. I just ran podman run -d --name toolbox --rm -it python:alpine sleep 1d
Need to look how containers/toolbox is created.

@JayDoubleu
Copy link
Author

@sshnaidm
Copy link
Member

sshnaidm commented Apr 6, 2021

Well, seems like toolbox mounts the whole home directory:

"Mounts": [
{
                "Type": "bind",
                "Source": "/home/fedora",
                "Destination": "/home/fedora",
                "Driver": "",
                "Mode": "",
                "Options": [
                    "rbind"
                ],
                "RW": true,
                "Propagation": "rslave"
            },

and short reproducing is:

podman cp /home/fedora/aaa fedora-toolbox-34:/home/fedora/
Error: "/home/fedora/" could not be found on container fedora-toolbox-34: operation not permitted

Maybe toolbox folks know what is the problem, or podman cp doesn't work with these kinds of mounts.

@JayDoubleu
Copy link
Author

This seems to be podman issue containers/podman#9985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants