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

Idempotency of containers recreated by systemd units #276

Closed
ivanov17 opened this issue Jul 29, 2021 · 2 comments · Fixed by #278
Closed

Idempotency of containers recreated by systemd units #276

ivanov17 opened this issue Jul 29, 2021 · 2 comments · Fixed by #278
Labels
bug/idempotency Bug related to idempotency of modules bug Something isn't working

Comments

@ivanov17
Copy link

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

/kind bug

Description

If a container created using Ansible is being recreated by systemd unit generated by podman-generate-systemd, it causes an idempotency issue.

On the one hand, they are two different containers. But it seems to be a wrong behavior because it takes away the possibility to check the created container if systemd controls it.

Steps to reproduce the issue:

  1. Create and run a pod and containers with containers.podman modules
  2. Generate systemd units with podman-generate-systemd using --new flag
  3. Enable and start generated service unit
  4. Run the playbook again

Describe the results you received:

After the generated units start, containers are being recreated with the parameters described in units. All the generated units contain --cidfile parameter and podman_systemd_unit label in addition to parameters and labels set by podman_container module. Also, it seems that podman-generate-systemd sorts other labels if they exist. Thus, the container described in the Ansible task and the container described in the generated unit is not the same container. Following playbook runs could be failed because containers are being recreated, and systemd services are being restarted (and the containers are being recreated again). If the playbook runs successfully, the containers are recreated successfully as well.

Describe the results you expected:

I think, if an existing container differs from its description in the Ansible task only by podman_systemd_unit label and --cidfile parameter, the module should not recreate it.

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

Version of the containers.podman collection:
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

$ ansible-galaxy collection install --force containers.podman
Process install dependency map
Starting collection install process
Installing 'containers.podman:1.6.1' to '/home/ivanov/.ansible/collections/ansible_collections/containers/podman'

Output of ansible --version:

ansible 2.9.23
  config file = /home/ivanov/ansible/drafts/ansible.cfg
  configured module search path = ['/home/ivanov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.6 (default, Jul 16 2021, 00:00:00) [GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]

Output of podman version:

Version:      3.2.3
API Version:  3.2.3
Go Version:   go1.16.5
Built:        Fri Jul 16 23:33:32 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.3
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.29-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: '
  cpus: 4
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: fedora.lan
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.13.4-200.fc34.x86_64
  linkmode: dynamic
  memFree: 3134083072
  memTotal: 8314068992
  ociRuntime:
    name: crun
    package: crun-0.20.1-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.20.1
      commit: 0d42f1109fd73548f44b01b3e84d04a279e99d2e
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/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: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 8313106432
  swapTotal: 8313106432
  uptime: 1h 32m 53.02s (Approximately 0.04 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 14
    paused: 0
    running: 3
    stopped: 11
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 11
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 3.2.3
  Built: 1626467612
  BuiltTime: Fri Jul 16 23:33:32 2021
  GitCommit: ""
  GoVersion: go1.16.5
  OsArch: linux/amd64
  Version: 3.2.3

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

podman-3.2.3-1.fc34.x86_64

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

- containers.podman.podman_pod:
    name: sample
    state: started
  become: yes

- containers.podman.podman_image:
    name: docker.io/library/alpine:latest
  become: yes

- containers.podman.podman_container:
    name: sample-first
    pod: sample
    image: docker.io/library/alpine:latest
    command: /bin/sh
    state: started
    tty: yes
  become: yes

- containers.podman.podman_container:
    name: sample-second
    pod: sample
    image: docker.io/library/alpine:latest
    command: /bin/sh
    state: started
    tty: yes
  become: yes

- ansible.builtin.command:
    cmd: "podman generate systemd --new --files --name sample"
    chdir: /etc/systemd/system
  become: yes

- ansible.builtin.systemd:
    name: "pod-sample.service"
    enabled: yes
    force: yes
  become: yes

- ansible.builtin.systemd:
    name: "pod-sample.service"
    daemon_reload: yes
    state: started
  become: yes

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

$ ansible-playbook sample-pod.yml -vv --diff --ask-become-pass 
ansible-playbook 2.9.23
  config file = /home/ivanov/ansible/drafts/ansible.cfg
  configured module search path = ['/home/ivanov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.6 (default, Jul 16 2021, 00:00:00) [GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]
Using /home/ivanov/ansible/drafts/ansible.cfg as config file
BECOME password: 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'selective', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.

PLAYBOOK: sample-pod.yml *********************************************************************************
1 plays in sample-pod.yml

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

TASK [Gathering Facts] ***********************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:2
ok: [localhost]
META: ran handlers

TASK [containers.podman.podman_pod] **********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:5
changed: [localhost] => {"actions": ["created sample", "started sample"], "changed": true, "pod": {"CgroupParent": "machine.slice", "CgroupPath": "machine.slice/machine-libpod_pod_5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b.slice", "Containers": [{"Id": "b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Name": "5c68aaf4216d-infra", "State": "running"}], "CreateCgroup": true, "CreateCommand": ["podman", "pod", "create", "--name", "sample"], "CreateInfra": true, "Created": "2021-07-29T04:39:20.140886665+03:00", "Hostname": "sample", "Id": "5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b", "InfraConfig": {"DNSOption": null, "DNSSearch": null, "DNSServer": null, "HostAdd": null, "HostNetwork": false, "NetworkOptions": null, "Networks": null, "NoManageHosts": false, "NoManageResolvConf": false, "PortBindings": {}, "StaticIP": "", "StaticMAC": ""}, "InfraContainerID": "b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Name": "sample", "NumContainers": 1, "SharedNamespaces": ["ipc", "net", "uts"], "State": "Running"}, "podman_actions": ["podman pod create --name sample", "podman pod start sample"], "stderr": "", "stderr_lines": [], "stdout": "5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b\n", "stdout_lines": ["5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b"]}

TASK [containers.podman.podman_image] ********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:10
changed: [localhost] => {"actions": ["Pulled image docker.io/library/alpine:latest"], "changed": true, "image": [{"Annotations": {}, "Architecture": "amd64", "Author": "", "Comment": "", "Config": {"Cmd": ["/bin/sh"], "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]}, "Created": "2021-06-15T22:19:37.842991933Z", "Digest": "sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0", "GraphDriver": {"Data": {"UpperDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/diff", "WorkDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/work"}, "Name": "overlay"}, "History": [{"created": "2021-06-15T22:19:37.639998211Z", "created_by": "/bin/sh -c #(nop) ADD file:f278386b0cef68136129f5f58c52445590a417b624d62bca158d4dc926c340df in / "}, {"created": "2021-06-15T22:19:37.842991933Z", "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/sh\"]", "empty_layer": true}], "Id": "d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83", "Labels": null, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json", "NamesHistory": ["docker.io/library/alpine:latest"], "Os": "linux", "Parent": "", "RepoDigests": ["docker.io/library/alpine@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d", "docker.io/library/alpine@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"], "RepoTags": ["docker.io/library/alpine:latest"], "RootFS": {"Layers": ["sha256:72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf"], "Type": "layers"}, "Size": 5869638, "User": "", "Version": "19.03.12", "VirtualSize": 5869638}], "podman_actions": ["/usr/bin/podman image ls docker.io/library/alpine:latest --format json", "/usr/bin/podman pull docker.io/library/alpine:latest -q", "/usr/bin/podman inspect d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83 --format json"]}

TASK [containers.podman.podman_container] ****************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:14
changed: [localhost] => {"actions": ["started sample-first"], "changed": true, "container": {"AppArmorProfile": "", "Args": ["/bin/sh"], "BoundingCaps": ["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"], "Config": {"Annotations": {"io.container.manager": "libpod", "io.kubernetes.cri-o.ContainerType": "container", "io.kubernetes.cri-o.Created": "2021-07-29T04:39:28.933721283+03:00", "io.kubernetes.cri-o.SandboxID": "sample", "io.kubernetes.cri-o.TTY": "true", "io.podman.annotations.autoremove": "FALSE", "io.podman.annotations.init": "FALSE", "io.podman.annotations.privileged": "FALSE", "io.podman.annotations.publish-all": "FALSE", "org.opencontainers.image.stopSignal": "15"}, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": ["/bin/sh"], "CreateCommand": ["podman", "container", "run", "--name", "sample-first", "--pod", "sample", "--tty=True", "--detach=True", "docker.io/library/alpine:latest", "/bin/sh"], "Domainname": "", "Entrypoint": "", "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "container=podman", "HOME=/root", "HOSTNAME=sample"], "Hostname": "sample", "Image": "docker.io/library/alpine:latest", "Labels": null, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "StopTimeout": 10, "Timeout": 0, "Tty": true, "Umask": "0022", "User": "", "Volumes": null, "WorkingDir": "/"}, "ConmonPidFile": "/var/run/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata/conmon.pid", "Created": "2021-07-29T04:39:28.933721283+03:00", "Dependencies": ["b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499"], "Driver": "overlay", "EffectiveCaps": ["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"], "ExecIDs": [], "ExitCommand": ["/usr/bin/podman", "--root", "/var/lib/containers/storage", "--runroot", "/var/run/containers/storage", "--log-level", "warning", "--cgroup-manager", "systemd", "--tmpdir", "/var/run/libpod", "--runtime", "crun", "--storage-driver", "overlay", "--storage-opt", "overlay.mountopt=nodev,metacopy=on", "--events-backend", "journald", "container", "cleanup", "fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b"], "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/diff", "MergedDir": "/var/lib/containers/storage/overlay/624389c54b729969447eb0e47bbc40c823040df927ce56ad4ff05a670975a7aa/merged", "UpperDir": "/var/lib/containers/storage/overlay/624389c54b729969447eb0e47bbc40c823040df927ce56ad4ff05a670975a7aa/diff", "WorkDir": "/var/lib/containers/storage/overlay/624389c54b729969447eb0e47bbc40c823040df927ce56ad4ff05a670975a7aa/work"}, "Name": "overlay"}, "HostConfig": {"AutoRemove": false, "Binds": [], "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": [], "CapDrop": ["CAP_AUDIT_WRITE", "CAP_MKNOD", "CAP_NET_RAW"], "Cgroup": "", "CgroupConf": null, "CgroupManager": "systemd", "CgroupMode": "private", "CgroupParent": "machine.slice/machine-libpod_pod_5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b.slice", "Cgroups": "default", "ConsoleSize": [0, 0], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Isolation": "", "KernelMemory": 0, "Links": null, "LogConfig": {"Config": null, "Path": "/var/lib/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata/ctr.log", "Size": "0B", "Tag": "", "Type": "k8s-file"}, "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": 0, "NanoCpus": 0, "NetworkMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "private", "PidsLimit": 2048, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "RestartPolicy": {"MaximumRetryCount": 0, "Name": ""}, "Runtime": "oci", "SecurityOpt": [], "ShmSize": 65536000, "Tmpfs": {}, "UTSMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Ulimits": [{"Hard": 1048576, "Name": "RLIMIT_NOFILE", "Soft": 1048576}, {"Hard": 4194304, "Name": "RLIMIT_NPROC", "Soft": 4194304}], "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null}, "HostnamePath": "/var/run/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata/hostname", "HostsPath": "/var/run/containers/storage/overlay-containers/b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499/userdata/hosts", "Id": "fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b", "Image": "d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83", "ImageName": "docker.io/library/alpine:latest", "IsInfra": false, "MountLabel": "system_u:object_r:container_file_t:s0:c461,c862", "Mounts": [], "Name": "sample-first", "Namespace": "", "NetworkSettings": {"Bridge": "", "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "10.88.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "76:d4:5e:92:9b:bb", "Networks": {"podman": {"DriverOpts": null, "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "10.88.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "76:d4:5e:92:9b:bb", "NetworkID": "podman", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::5/64"]}}, "Ports": {}, "SandboxID": "", "SandboxKey": "/run/netns/cni-8700746b-203d-9749-fc6c-45e38646ea18", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::5/64"]}, "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata/config.json", "OCIRuntime": "crun", "Path": "/bin/sh", "PidFile": "/var/run/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata/pidfile", "Pod": "5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b", "ProcessLabel": "system_u:system_r:container_t:s0:c461,c862", "ResolvConfPath": "/var/run/containers/storage/overlay-containers/b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499/userdata/resolv.conf", "RestartCount": 0, "Rootfs": "", "State": {"ConmonPid": 10544, "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Healthcheck": {"FailingStreak": 0, "Log": null, "Status": ""}, "OOMKilled": false, "OciVersion": "1.0.2-dev", "Paused": false, "Pid": 10547, "Restarting": false, "Running": true, "StartedAt": "2021-07-29T04:39:29.076443297+03:00", "Status": "running"}, "StaticDir": "/var/lib/containers/storage/overlay-containers/fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b/userdata"}, "podman_actions": ["podman run --name sample-first --pod sample --tty=True --detach=True docker.io/library/alpine:latest /bin/sh"], "stderr": "", "stderr_lines": [], "stdout": "fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b\n", "stdout_lines": ["fd8ae398f77137d4a46a633b505c07759ed784ceccec537f56baf8837145af5b"]}

TASK [containers.podman.podman_container] ****************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:23
changed: [localhost] => {"actions": ["started sample-second"], "changed": true, "container": {"AppArmorProfile": "", "Args": ["/bin/sh"], "BoundingCaps": ["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"], "Config": {"Annotations": {"io.container.manager": "libpod", "io.kubernetes.cri-o.ContainerType": "container", "io.kubernetes.cri-o.Created": "2021-07-29T04:39:29.980125004+03:00", "io.kubernetes.cri-o.SandboxID": "sample", "io.kubernetes.cri-o.TTY": "true", "io.podman.annotations.autoremove": "FALSE", "io.podman.annotations.init": "FALSE", "io.podman.annotations.privileged": "FALSE", "io.podman.annotations.publish-all": "FALSE", "org.opencontainers.image.stopSignal": "15"}, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": ["/bin/sh"], "CreateCommand": ["podman", "container", "run", "--name", "sample-second", "--pod", "sample", "--tty=True", "--detach=True", "docker.io/library/alpine:latest", "/bin/sh"], "Domainname": "", "Entrypoint": "", "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "container=podman", "HOME=/root", "HOSTNAME=sample"], "Hostname": "sample", "Image": "docker.io/library/alpine:latest", "Labels": null, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "StopTimeout": 10, "Timeout": 0, "Tty": true, "Umask": "0022", "User": "", "Volumes": null, "WorkingDir": "/"}, "ConmonPidFile": "/var/run/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata/conmon.pid", "Created": "2021-07-29T04:39:29.980125004+03:00", "Dependencies": ["b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499"], "Driver": "overlay", "EffectiveCaps": ["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"], "ExecIDs": [], "ExitCommand": ["/usr/bin/podman", "--root", "/var/lib/containers/storage", "--runroot", "/var/run/containers/storage", "--log-level", "warning", "--cgroup-manager", "systemd", "--tmpdir", "/var/run/libpod", "--runtime", "crun", "--storage-driver", "overlay", "--storage-opt", "overlay.mountopt=nodev,metacopy=on", "--events-backend", "journald", "container", "cleanup", "2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b"], "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/diff", "MergedDir": "/var/lib/containers/storage/overlay/22a8dfa867e9ea5c56b0d1093d92a83d144a736a8321ca471da4c9cc2aecb8b6/merged", "UpperDir": "/var/lib/containers/storage/overlay/22a8dfa867e9ea5c56b0d1093d92a83d144a736a8321ca471da4c9cc2aecb8b6/diff", "WorkDir": "/var/lib/containers/storage/overlay/22a8dfa867e9ea5c56b0d1093d92a83d144a736a8321ca471da4c9cc2aecb8b6/work"}, "Name": "overlay"}, "HostConfig": {"AutoRemove": false, "Binds": [], "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": [], "CapDrop": ["CAP_AUDIT_WRITE", "CAP_MKNOD", "CAP_NET_RAW"], "Cgroup": "", "CgroupConf": null, "CgroupManager": "systemd", "CgroupMode": "private", "CgroupParent": "machine.slice/machine-libpod_pod_5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b.slice", "Cgroups": "default", "ConsoleSize": [0, 0], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Isolation": "", "KernelMemory": 0, "Links": null, "LogConfig": {"Config": null, "Path": "/var/lib/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata/ctr.log", "Size": "0B", "Tag": "", "Type": "k8s-file"}, "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": 0, "NanoCpus": 0, "NetworkMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "private", "PidsLimit": 2048, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "RestartPolicy": {"MaximumRetryCount": 0, "Name": ""}, "Runtime": "oci", "SecurityOpt": [], "ShmSize": 65536000, "Tmpfs": {}, "UTSMode": "container:b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499", "Ulimits": [{"Hard": 1048576, "Name": "RLIMIT_NOFILE", "Soft": 1048576}, {"Hard": 4194304, "Name": "RLIMIT_NPROC", "Soft": 4194304}], "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null}, "HostnamePath": "/var/run/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata/hostname", "HostsPath": "/var/run/containers/storage/overlay-containers/b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499/userdata/hosts", "Id": "2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b", "Image": "d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83", "ImageName": "docker.io/library/alpine:latest", "IsInfra": false, "MountLabel": "system_u:object_r:container_file_t:s0:c461,c862", "Mounts": [], "Name": "sample-second", "Namespace": "", "NetworkSettings": {"Bridge": "", "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "10.88.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "76:d4:5e:92:9b:bb", "Networks": {"podman": {"DriverOpts": null, "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "10.88.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "76:d4:5e:92:9b:bb", "NetworkID": "podman", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::5/64"]}}, "Ports": {}, "SandboxID": "", "SandboxKey": "/run/netns/cni-8700746b-203d-9749-fc6c-45e38646ea18", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::5/64"]}, "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata/config.json", "OCIRuntime": "crun", "Path": "/bin/sh", "PidFile": "/var/run/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata/pidfile", "Pod": "5c68aaf4216dd9c9364f2449d8c1444a328dffa28bcd9162f18a3b94b5440c6b", "ProcessLabel": "system_u:system_r:container_t:s0:c461,c862", "ResolvConfPath": "/var/run/containers/storage/overlay-containers/b78ad7b396c864a50abeceb3b801a40621425f484725a72b6a150de215a4f499/userdata/resolv.conf", "RestartCount": 0, "Rootfs": "", "State": {"ConmonPid": 10703, "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Healthcheck": {"FailingStreak": 0, "Log": null, "Status": ""}, "OOMKilled": false, "OciVersion": "1.0.2-dev", "Paused": false, "Pid": 10706, "Restarting": false, "Running": true, "StartedAt": "2021-07-29T04:39:30.118535787+03:00", "Status": "running"}, "StaticDir": "/var/lib/containers/storage/overlay-containers/2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b/userdata"}, "podman_actions": ["podman run --name sample-second --pod sample --tty=True --detach=True docker.io/library/alpine:latest /bin/sh"], "stderr": "", "stderr_lines": [], "stdout": "2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b\n", "stdout_lines": ["2ff022d578d34144cfeca70d0136780901d17aad697a38f76ad266549af9b40b"]}

TASK [ansible.builtin.command] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:32
changed: [localhost] => {"changed": true, "cmd": ["podman", "generate", "systemd", "--new", "--files", "--name", "sample"], "delta": "0:00:00.163369", "end": "2021-07-29 04:39:30.988564", "rc": 0, "start": "2021-07-29 04:39:30.825195", "stderr": "", "stderr_lines": [], "stdout": "/etc/systemd/system/pod-sample.service\n/etc/systemd/system/container-sample-second.service\n/etc/systemd/system/container-sample-first.service", "stdout_lines": ["/etc/systemd/system/pod-sample.service", "/etc/systemd/system/container-sample-second.service", "/etc/systemd/system/container-sample-first.service"]}

TASK [ansible.builtin.systemd] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:37
changed: [localhost] => {"changed": true, "enabled": true, "name": "pod-sample.service", "status": {"ActiveEnterTimestamp": "Thu 2021-07-29 04:36:15 MSK", "ActiveEnterTimestampMonotonic": "1534167046", "ActiveExitTimestamp": "Thu 2021-07-29 04:38:32 MSK", "ActiveExitTimestampMonotonic": "1671154924", "ActiveState": "inactive", "After": "network-online.target systemd-journald.socket basic.target system.slice sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Thu 2021-07-29 04:35:51 MSK", "AssertTimestampMonotonic": "1510625788", "Before": "container-sample-second.service container-sample-first.service shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BoundBy": "container-sample-second.service container-sample-first.service", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "1053373000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Thu 2021-07-29 04:35:51 MSK", "ConditionTimestampMonotonic": "1510625786", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Podman pod-sample.service", "DevicePolicy": "auto", "Documentation": "\"man:podman-generate-systemd(1)\"", "DynamicUser": "no", "Environment": "PODMAN_SYSTEMD_UNIT=pod-sample.service", "ExecMainCode": "1", "ExecMainExitTimestamp": "Thu 2021-07-29 04:38:32 MSK", "ExecMainExitTimestampMonotonic": "1671524361", "ExecMainPID": "8832", "ExecMainStartTimestamp": "Thu 2021-07-29 04:36:15 MSK", "ExecMainStartTimestampMonotonic": "1534166913", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPreEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPost": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPostEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/etc/systemd/system/pod-sample.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "pod-sample.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Thu 2021-07-29 04:38:32 MSK", "InactiveEnterTimestampMonotonic": "1671685222", "InactiveExitTimestamp": "Thu 2021-07-29 04:35:51 MSK", "InactiveExitTimestampMonotonic": "1510633287", "InvocationID": "1d9a54d5d75d4703a1dbd5824940b1c7", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "31538", "LimitNPROCSoft": "31538", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "31538", "LimitSIGPENDINGSoft": "31538", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "0", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryCurrent": "[not set]", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "pod-sample.service", "NeedDaemonReload": "yes", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/pod-sample.pid", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "container-sample-second.service container-sample-first.service system.slice sysinit.target", "Restart": "on-failure", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Thu 2021-07-29 04:38:32 MSK", "StateChangeTimestampMonotonic": "1671685222", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "[not set]", "TasksMax": "9461", "TimeoutAbortUSec": "1min 10s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 10s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "forking", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "disabled", "UtmpMode": "init", "Wants": "network.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}

TASK [ansible.builtin.systemd] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:43
changed: [localhost] => {"changed": true, "name": "pod-sample.service", "state": "started", "status": {"ActiveEnterTimestamp": "Thu 2021-07-29 04:36:15 MSK", "ActiveEnterTimestampMonotonic": "1534167046", "ActiveExitTimestamp": "Thu 2021-07-29 04:38:32 MSK", "ActiveExitTimestampMonotonic": "1671154924", "ActiveState": "inactive", "After": "sysinit.target basic.target network-online.target system.slice systemd-journald.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Thu 2021-07-29 04:35:51 MSK", "AssertTimestampMonotonic": "1510625788", "Before": "multi-user.target graphical.target container-sample-second.service container-sample-first.service shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BoundBy": "container-sample-first.service container-sample-second.service", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "1053373000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Thu 2021-07-29 04:35:51 MSK", "ConditionTimestampMonotonic": "1510625786", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Podman pod-sample.service", "DevicePolicy": "auto", "Documentation": "\"man:podman-generate-systemd(1)\"", "DynamicUser": "no", "Environment": "PODMAN_SYSTEMD_UNIT=pod-sample.service", "ExecMainCode": "1", "ExecMainExitTimestamp": "Thu 2021-07-29 04:38:32 MSK", "ExecMainExitTimestampMonotonic": "1671524361", "ExecMainPID": "8832", "ExecMainStartTimestamp": "Thu 2021-07-29 04:36:15 MSK", "ExecMainStartTimestampMonotonic": "1534166913", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPreEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPost": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPostEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/etc/systemd/system/pod-sample.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "pod-sample.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Thu 2021-07-29 04:38:32 MSK", "InactiveEnterTimestampMonotonic": "1671685222", "InactiveExitTimestamp": "Thu 2021-07-29 04:35:51 MSK", "InactiveExitTimestampMonotonic": "1510633287", "InvocationID": "1d9a54d5d75d4703a1dbd5824940b1c7", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "31538", "LimitNPROCSoft": "31538", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "31538", "LimitSIGPENDINGSoft": "31538", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "0", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryCurrent": "[not set]", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "pod-sample.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/pod-sample.pid", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "container-sample-first.service sysinit.target system.slice container-sample-second.service", "Restart": "on-failure", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Thu 2021-07-29 04:38:32 MSK", "StateChangeTimestampMonotonic": "1671685222", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "[not set]", "TasksMax": "9461", "TimeoutAbortUSec": "1min 10s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 10s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "forking", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "graphical.target multi-user.target", "Wants": "network.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}
META: ran handlers
META: ran handlers

PLAY RECAP ***********************************************************************************************
localhost                  : ok=8    changed=7    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
$ ansible-playbook sample-pod.yml -vv --diff --ask-become-pass 
ansible-playbook 2.9.23
  config file = /home/ivanov/ansible/drafts/ansible.cfg
  configured module search path = ['/home/ivanov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.6 (default, Jul 16 2021, 00:00:00) [GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]
Using /home/ivanov/ansible/drafts/ansible.cfg as config file
BECOME password: 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'selective', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.

PLAYBOOK: sample-pod.yml *********************************************************************************
1 plays in sample-pod.yml

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

TASK [Gathering Facts] ***********************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:2
ok: [localhost]
META: ran handlers

TASK [containers.podman.podman_pod] **********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:5
ok: [localhost] => {"actions": [], "changed": false, "pod": {"CgroupParent": "machine.slice", "CgroupPath": "machine.slice/machine-libpod_pod_efeccbfdaa3e47078454a39d6e33d5e1afa57cd8e99d7b494805b80362324bad.slice", "Containers": [{"Id": "3fb4e645510df4b617121786c739be773da8f18ce361f66179c41d0e6e687431", "Name": "efeccbfdaa3e-infra", "State": "running"}, {"Id": "a96c7ff4cda1c4f6da0dd1c8dc0623f4e2dd0414228b3b95a33dc73e68e2d1cd", "Name": "sample-first", "State": "running"}, {"Id": "ac13154597d33dec9889e4b45e81d053b64585136d22d6dfa0e601ec49794f0e", "Name": "sample-second", "State": "running"}], "CreateCgroup": true, "CreateCommand": ["/usr/bin/podman", "pod", "create", "--infra-conmon-pidfile", "/run/pod-sample.pid", "--pod-id-file", "/run/pod-sample.pod-id", "--name", "sample", "--replace"], "CreateInfra": true, "Created": "2021-07-29T04:39:54.185627391+03:00", "Hostname": "sample", "Id": "efeccbfdaa3e47078454a39d6e33d5e1afa57cd8e99d7b494805b80362324bad", "InfraConfig": {"DNSOption": null, "DNSSearch": null, "DNSServer": null, "HostAdd": null, "HostNetwork": false, "NetworkOptions": null, "Networks": null, "NoManageHosts": false, "NoManageResolvConf": false, "PortBindings": {}, "StaticIP": "", "StaticMAC": ""}, "InfraContainerID": "3fb4e645510df4b617121786c739be773da8f18ce361f66179c41d0e6e687431", "Name": "sample", "NumContainers": 3, "SharedNamespaces": ["ipc", "net", "uts"], "State": "Running"}, "podman_actions": [], "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

TASK [containers.podman.podman_image] ********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:10
ok: [localhost] => {"actions": [], "changed": false, "image": {}, "podman_actions": ["/usr/bin/podman image ls docker.io/library/alpine:latest --format json"]}

TASK [containers.podman.podman_container] ****************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:14
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Can't delete container sample-first", "stderr": "Error: no container with name or ID \"sample-first\" found: no such container\n", "stderr_lines": ["Error: no container with name or ID \"sample-first\" found: no such container"], "stdout": "", "stdout_lines": []}

PLAY RECAP ***********************************************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
$ ansible-playbook sample-pod.yml -vv --diff --ask-become-pass 
ansible-playbook 2.9.23
  config file = /home/ivanov/ansible/drafts/ansible.cfg
  configured module search path = ['/home/ivanov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.6 (default, Jul 16 2021, 00:00:00) [GCC 11.1.1 20210531 (Red Hat 11.1.1-3)]
Using /home/ivanov/ansible/drafts/ansible.cfg as config file
BECOME password: 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'selective', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.

PLAYBOOK: sample-pod.yml *********************************************************************************
1 plays in sample-pod.yml

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

TASK [Gathering Facts] ***********************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:2
ok: [localhost]
META: ran handlers

TASK [containers.podman.podman_pod] **********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:5
ok: [localhost] => {"actions": [], "changed": false, "pod": {"CgroupParent": "machine.slice", "CgroupPath": "machine.slice/machine-libpod_pod_304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8.slice", "Containers": [{"Id": "1947a69d13a9e6f0b92a71fcdc078d97e611d3baa3ef73f9d615ce2eea7f667d", "Name": "sample-second", "State": "running"}, {"Id": "ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Name": "304be80f0488-infra", "State": "running"}, {"Id": "ff15d4924d239f087e71b3f47fea646f0b36262b316041074efa7a0b6947b798", "Name": "sample-first", "State": "running"}], "CreateCgroup": true, "CreateCommand": ["/usr/bin/podman", "pod", "create", "--infra-conmon-pidfile", "/run/pod-sample.pid", "--pod-id-file", "/run/pod-sample.pod-id", "--name", "sample", "--replace"], "CreateInfra": true, "Created": "2021-07-29T04:40:43.096656904+03:00", "Hostname": "sample", "Id": "304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8", "InfraConfig": {"DNSOption": null, "DNSSearch": null, "DNSServer": null, "HostAdd": null, "HostNetwork": false, "NetworkOptions": null, "Networks": null, "NoManageHosts": false, "NoManageResolvConf": false, "PortBindings": {}, "StaticIP": "", "StaticMAC": ""}, "InfraContainerID": "ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Name": "sample", "NumContainers": 3, "SharedNamespaces": ["ipc", "net", "uts"], "State": "Running"}, "podman_actions": [], "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

TASK [containers.podman.podman_image] ********************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:10
ok: [localhost] => {"actions": [], "changed": false, "image": {}, "podman_actions": ["/usr/bin/podman image ls docker.io/library/alpine:latest --format json"]}

TASK [containers.podman.podman_container] ****************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:14
--- before
+++ after
@@ -1,2 +1,2 @@
-cidfile - /run/container-sample-first.ctr-id
-label - {'podman_systemd_unit': 'container-sample-first.service'}
+cidfile - 
+label - {}

changed: [localhost] => {"actions": ["recreated sample-first"], "changed": true, "container": {"AppArmorProfile": "", "Args": ["/bin/sh"], "BoundingCaps": ["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"], "Config": {"Annotations": {"io.container.manager": "libpod", "io.kubernetes.cri-o.ContainerType": "container", "io.kubernetes.cri-o.Created": "2021-07-29T04:41:15.137353213+03:00", "io.kubernetes.cri-o.SandboxID": "sample", "io.kubernetes.cri-o.TTY": "true", "io.podman.annotations.autoremove": "FALSE", "io.podman.annotations.init": "FALSE", "io.podman.annotations.privileged": "FALSE", "io.podman.annotations.publish-all": "FALSE", "org.opencontainers.image.stopSignal": "15"}, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": ["/bin/sh"], "CreateCommand": ["podman", "container", "run", "--name", "sample-first", "--pod", "sample", "--tty=True", "--detach=True", "docker.io/library/alpine:latest", "/bin/sh"], "Domainname": "", "Entrypoint": "", "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "container=podman", "HOME=/root", "HOSTNAME=sample"], "Hostname": "sample", "Image": "docker.io/library/alpine:latest", "Labels": null, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "StopTimeout": 10, "Timeout": 0, "Tty": true, "Umask": "0022", "User": "", "Volumes": null, "WorkingDir": "/"}, "ConmonPidFile": "/var/run/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata/conmon.pid", "Created": "2021-07-29T04:41:15.137353213+03:00", "Dependencies": ["ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63"], "Driver": "overlay", "EffectiveCaps": ["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"], "ExecIDs": [], "ExitCommand": ["/usr/bin/podman", "--root", "/var/lib/containers/storage", "--runroot", "/var/run/containers/storage", "--log-level", "warning", "--cgroup-manager", "systemd", "--tmpdir", "/var/run/libpod", "--runtime", "crun", "--storage-driver", "overlay", "--storage-opt", "overlay.mountopt=nodev,metacopy=on", "--events-backend", "journald", "container", "cleanup", "c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5"], "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/diff", "MergedDir": "/var/lib/containers/storage/overlay/2bb7d3d7f674b3325239a9362573e34863c6934080e08333338eed39579a55c7/merged", "UpperDir": "/var/lib/containers/storage/overlay/2bb7d3d7f674b3325239a9362573e34863c6934080e08333338eed39579a55c7/diff", "WorkDir": "/var/lib/containers/storage/overlay/2bb7d3d7f674b3325239a9362573e34863c6934080e08333338eed39579a55c7/work"}, "Name": "overlay"}, "HostConfig": {"AutoRemove": false, "Binds": [], "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": [], "CapDrop": ["CAP_AUDIT_WRITE", "CAP_MKNOD", "CAP_NET_RAW"], "Cgroup": "", "CgroupConf": null, "CgroupManager": "systemd", "CgroupMode": "private", "CgroupParent": "machine.slice/machine-libpod_pod_304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8.slice", "Cgroups": "default", "ConsoleSize": [0, 0], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Isolation": "", "KernelMemory": 0, "Links": null, "LogConfig": {"Config": null, "Path": "/var/lib/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata/ctr.log", "Size": "0B", "Tag": "", "Type": "k8s-file"}, "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": 0, "NanoCpus": 0, "NetworkMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "private", "PidsLimit": 2048, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "RestartPolicy": {"MaximumRetryCount": 0, "Name": ""}, "Runtime": "oci", "SecurityOpt": [], "ShmSize": 65536000, "Tmpfs": {}, "UTSMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Ulimits": [{"Hard": 1048576, "Name": "RLIMIT_NOFILE", "Soft": 1048576}, {"Hard": 4194304, "Name": "RLIMIT_NPROC", "Soft": 4194304}], "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null}, "HostnamePath": "/var/run/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata/hostname", "HostsPath": "/var/run/containers/storage/overlay-containers/ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63/userdata/hosts", "Id": "c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5", "Image": "d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83", "ImageName": "docker.io/library/alpine:latest", "IsInfra": false, "MountLabel": "system_u:object_r:container_file_t:s0:c371,c752", "Mounts": [], "Name": "sample-first", "Namespace": "", "NetworkSettings": {"Bridge": "", "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "10.88.0.7", "IPPrefixLen": 16, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "2e:5d:aa:ac:43:19", "Networks": {"podman": {"DriverOpts": null, "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "10.88.0.7", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "2e:5d:aa:ac:43:19", "NetworkID": "podman", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::7/64"]}}, "Ports": {}, "SandboxID": "", "SandboxKey": "/run/netns/cni-1ec9abf2-8b2e-b6ba-6dd4-e862013df95e", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::7/64"]}, "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata/config.json", "OCIRuntime": "crun", "Path": "/bin/sh", "PidFile": "/var/run/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata/pidfile", "Pod": "304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8", "ProcessLabel": "system_u:system_r:container_t:s0:c371,c752", "ResolvConfPath": "/var/run/containers/storage/overlay-containers/ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63/userdata/resolv.conf", "RestartCount": 0, "Rootfs": "", "State": {"ConmonPid": 12989, "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Healthcheck": {"FailingStreak": 0, "Log": null, "Status": ""}, "OOMKilled": false, "OciVersion": "1.0.2-dev", "Paused": false, "Pid": 12993, "Restarting": false, "Running": true, "StartedAt": "2021-07-29T04:41:15.27708566+03:00", "Status": "running"}, "StaticDir": "/var/lib/containers/storage/overlay-containers/c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5/userdata"}, "podman_actions": ["podman stop sample-first", "podman rm -f sample-first", "podman run --name sample-first --pod sample --tty=True --detach=True docker.io/library/alpine:latest /bin/sh"], "stderr": "", "stderr_lines": [], "stdout": "c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5\n", "stdout_lines": ["c1dcfb9e2aeffec68fb7e0c23a3e0f9b767a2687510d2c35091da7cba35251e5"]}

TASK [containers.podman.podman_container] ****************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:23
--- before
+++ after
@@ -1,2 +1,2 @@
-cidfile - /run/container-sample-second.ctr-id
-label - {'podman_systemd_unit': 'container-sample-second.service'}
+cidfile - 
+label - {}

changed: [localhost] => {"actions": ["recreated sample-second"], "changed": true, "container": {"AppArmorProfile": "", "Args": ["/bin/sh"], "BoundingCaps": ["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"], "Config": {"Annotations": {"io.container.manager": "libpod", "io.kubernetes.cri-o.ContainerType": "container", "io.kubernetes.cri-o.Created": "2021-07-29T04:41:16.675334817+03:00", "io.kubernetes.cri-o.SandboxID": "sample", "io.kubernetes.cri-o.TTY": "true", "io.podman.annotations.autoremove": "FALSE", "io.podman.annotations.init": "FALSE", "io.podman.annotations.privileged": "FALSE", "io.podman.annotations.publish-all": "FALSE", "org.opencontainers.image.stopSignal": "15"}, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": ["/bin/sh"], "CreateCommand": ["podman", "container", "run", "--name", "sample-second", "--pod", "sample", "--tty=True", "--detach=True", "docker.io/library/alpine:latest", "/bin/sh"], "Domainname": "", "Entrypoint": "", "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "container=podman", "HOME=/root", "HOSTNAME=sample"], "Hostname": "sample", "Image": "docker.io/library/alpine:latest", "Labels": null, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "StopTimeout": 10, "Timeout": 0, "Tty": true, "Umask": "0022", "User": "", "Volumes": null, "WorkingDir": "/"}, "ConmonPidFile": "/var/run/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata/conmon.pid", "Created": "2021-07-29T04:41:16.675334817+03:00", "Dependencies": ["ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63"], "Driver": "overlay", "EffectiveCaps": ["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"], "ExecIDs": [], "ExitCommand": ["/usr/bin/podman", "--root", "/var/lib/containers/storage", "--runroot", "/var/run/containers/storage", "--log-level", "warning", "--cgroup-manager", "systemd", "--tmpdir", "/var/run/libpod", "--runtime", "crun", "--storage-driver", "overlay", "--storage-opt", "overlay.mountopt=nodev,metacopy=on", "--events-backend", "journald", "container", "cleanup", "d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b"], "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/72e830a4dff5f0d5225cdc0a320e85ab1ce06ea5673acfe8d83a7645cbd0e9cf/diff", "MergedDir": "/var/lib/containers/storage/overlay/d1f66fee7df0a063c0a0ceaaaff0457d73e54b32b144910418127e81be9f3d6f/merged", "UpperDir": "/var/lib/containers/storage/overlay/d1f66fee7df0a063c0a0ceaaaff0457d73e54b32b144910418127e81be9f3d6f/diff", "WorkDir": "/var/lib/containers/storage/overlay/d1f66fee7df0a063c0a0ceaaaff0457d73e54b32b144910418127e81be9f3d6f/work"}, "Name": "overlay"}, "HostConfig": {"AutoRemove": false, "Binds": [], "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": [], "CapDrop": ["CAP_AUDIT_WRITE", "CAP_MKNOD", "CAP_NET_RAW"], "Cgroup": "", "CgroupConf": null, "CgroupManager": "systemd", "CgroupMode": "private", "CgroupParent": "machine.slice/machine-libpod_pod_304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8.slice", "Cgroups": "default", "ConsoleSize": [0, 0], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Isolation": "", "KernelMemory": 0, "Links": null, "LogConfig": {"Config": null, "Path": "/var/lib/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata/ctr.log", "Size": "0B", "Tag": "", "Type": "k8s-file"}, "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": 0, "NanoCpus": 0, "NetworkMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "private", "PidsLimit": 2048, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "RestartPolicy": {"MaximumRetryCount": 0, "Name": ""}, "Runtime": "oci", "SecurityOpt": [], "ShmSize": 65536000, "Tmpfs": {}, "UTSMode": "container:ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63", "Ulimits": [{"Hard": 1048576, "Name": "RLIMIT_NOFILE", "Soft": 1048576}, {"Hard": 4194304, "Name": "RLIMIT_NPROC", "Soft": 4194304}], "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null}, "HostnamePath": "/var/run/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata/hostname", "HostsPath": "/var/run/containers/storage/overlay-containers/ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63/userdata/hosts", "Id": "d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b", "Image": "d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe139b83", "ImageName": "docker.io/library/alpine:latest", "IsInfra": false, "MountLabel": "system_u:object_r:container_file_t:s0:c371,c752", "Mounts": [], "Name": "sample-second", "Namespace": "", "NetworkSettings": {"Bridge": "", "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "10.88.0.7", "IPPrefixLen": 16, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "2e:5d:aa:ac:43:19", "Networks": {"podman": {"DriverOpts": null, "EndpointID": "", "Gateway": "10.88.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "10.88.0.7", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "2e:5d:aa:ac:43:19", "NetworkID": "podman", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::7/64"]}}, "Ports": {}, "SandboxID": "", "SandboxKey": "/run/netns/cni-1ec9abf2-8b2e-b6ba-6dd4-e862013df95e", "SecondaryIPv6Addresses": ["fd2c:85cb:8100:7ca6::7/64"]}, "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata/config.json", "OCIRuntime": "crun", "Path": "/bin/sh", "PidFile": "/var/run/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata/pidfile", "Pod": "304be80f04883bc268ce141e730942f222389b2a69b75eda8a692a1f3d7929b8", "ProcessLabel": "system_u:system_r:container_t:s0:c371,c752", "ResolvConfPath": "/var/run/containers/storage/overlay-containers/ef828dc7ebd89293d56cc82ab828d4bbe0f6626731b20380c9c9544c32536d63/userdata/resolv.conf", "RestartCount": 0, "Rootfs": "", "State": {"ConmonPid": 13268, "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Healthcheck": {"FailingStreak": 0, "Log": null, "Status": ""}, "OOMKilled": false, "OciVersion": "1.0.2-dev", "Paused": false, "Pid": 13271, "Restarting": false, "Running": true, "StartedAt": "2021-07-29T04:41:16.81597463+03:00", "Status": "running"}, "StaticDir": "/var/lib/containers/storage/overlay-containers/d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b/userdata"}, "podman_actions": ["podman rm -f sample-second", "podman run --name sample-second --pod sample --tty=True --detach=True docker.io/library/alpine:latest /bin/sh"], "stderr": "", "stderr_lines": [], "stdout": "d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b\n", "stdout_lines": ["d60a4c76fdc58ff84baccdec10f7d4bf380bc2f38ff637d049050f818ec66c8b"]}

TASK [ansible.builtin.command] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:32
changed: [localhost] => {"changed": true, "cmd": ["podman", "generate", "systemd", "--new", "--files", "--name", "sample"], "delta": "0:00:00.167719", "end": "2021-07-29 04:41:17.630947", "rc": 0, "start": "2021-07-29 04:41:17.463228", "stderr": "", "stderr_lines": [], "stdout": "/etc/systemd/system/pod-sample.service\n/etc/systemd/system/container-sample-first.service\n/etc/systemd/system/container-sample-second.service", "stdout_lines": ["/etc/systemd/system/pod-sample.service", "/etc/systemd/system/container-sample-first.service", "/etc/systemd/system/container-sample-second.service"]}

TASK [ansible.builtin.systemd] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:37
ok: [localhost] => {"changed": false, "enabled": true, "name": "pod-sample.service", "status": {"ActiveEnterTimestamp": "Thu 2021-07-29 04:40:45 MSK", "ActiveEnterTimestampMonotonic": "1804421152", "ActiveExitTimestamp": "Thu 2021-07-29 04:40:42 MSK", "ActiveExitTimestampMonotonic": "1801455394", "ActiveState": "active", "After": "sysinit.target basic.target network-online.target system.slice systemd-journald.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Thu 2021-07-29 04:40:43 MSK", "AssertTimestampMonotonic": "1802086497", "Before": "multi-user.target graphical.target container-sample-second.service container-sample-first.service shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BoundBy": "container-sample-first.service container-sample-second.service", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "429373000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Thu 2021-07-29 04:40:43 MSK", "ConditionTimestampMonotonic": "1802086493", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/pod-sample.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Podman pod-sample.service", "DevicePolicy": "auto", "Documentation": "\"man:podman-generate-systemd(1)\"", "DynamicUser": "no", "Environment": "PODMAN_SYSTEMD_UNIT=pod-sample.service", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "12355", "ExecMainStartTimestamp": "Thu 2021-07-29 04:40:45 MSK", "ExecMainStartTimestampMonotonic": "1804421020", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[Thu 2021-07-29 04:40:43 MSK] ; stop_time=[Thu 2021-07-29 04:40:45 MSK] ; pid=12247 ; code=exited ; status=0 }", "ExecStartEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[Thu 2021-07-29 04:40:43 MSK] ; stop_time=[Thu 2021-07-29 04:40:45 MSK] ; pid=12247 ; code=exited ; status=0 }", "ExecStartPre": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; ignore_errors=no ; start_time=[Thu 2021-07-29 04:40:43 MSK] ; stop_time=[Thu 2021-07-29 04:40:43 MSK] ; pid=12202 ; code=exited ; status=0 }", "ExecStartPreEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; flags= ; start_time=[Thu 2021-07-29 04:40:43 MSK] ; stop_time=[Thu 2021-07-29 04:40:43 MSK] ; pid=12202 ; code=exited ; status=0 }", "ExecStop": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPost": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPostEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/etc/systemd/system/pod-sample.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "pod-sample.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Thu 2021-07-29 04:40:43 MSK", "InactiveEnterTimestampMonotonic": "1802085253", "InactiveExitTimestamp": "Thu 2021-07-29 04:40:43 MSK", "InactiveExitTimestampMonotonic": "1802088854", "InvocationID": "e537ba8270804a0a88581e38636b0030", "Job": "6058", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "31538", "LimitNPROCSoft": "31538", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "31538", "LimitSIGPENDINGSoft": "31538", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "12355", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryCurrent": "847872", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "pod-sample.service", "NeedDaemonReload": "yes", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/pod-sample.pid", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "container-sample-first.service sysinit.target system.slice container-sample-second.service", "Restart": "on-failure", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Thu 2021-07-29 04:40:45 MSK", "StateChangeTimestampMonotonic": "1804421152", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "2", "TasksMax": "9461", "TimeoutAbortUSec": "1min 10s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 10s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "forking", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "graphical.target multi-user.target", "Wants": "network.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}

TASK [ansible.builtin.systemd] ***************************************************************************
task path: /home/ivanov/ansible/drafts/sample-pod.yml:43
ok: [localhost] => {"changed": false, "name": "pod-sample.service", "state": "started", "status": {"ActiveEnterTimestamp": "Thu 2021-07-29 04:40:45 MSK", "ActiveEnterTimestampMonotonic": "1804421152", "ActiveExitTimestamp": "Thu 2021-07-29 04:40:42 MSK", "ActiveExitTimestampMonotonic": "1801455394", "ActiveState": "active", "After": "network-online.target basic.target systemd-journald.socket system.slice sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Thu 2021-07-29 04:40:43 MSK", "AssertTimestampMonotonic": "1802086497", "Before": "multi-user.target shutdown.target graphical.target container-sample-second.service container-sample-first.service", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BoundBy": "container-sample-first.service container-sample-second.service", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "429373000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Thu 2021-07-29 04:40:43 MSK", "ConditionTimestampMonotonic": "1802086493", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/pod-sample.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Podman pod-sample.service", "DevicePolicy": "auto", "Documentation": "\"man:podman-generate-systemd(1)\"", "DynamicUser": "no", "Environment": "PODMAN_SYSTEMD_UNIT=pod-sample.service", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "12355", "ExecMainStartTimestamp": "Thu 2021-07-29 04:40:45 MSK", "ExecMainStartTimestampMonotonic": "1804421020", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod start --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPreEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod create --infra-conmon-pidfile /run/pod-sample.pid --pod-id-file /run/pod-sample.pod-id --name sample --replace ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod stop --ignore --pod-id-file /run/pod-sample.pod-id -t 10 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPost": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStopPostEx": "{ path=/usr/bin/podman ; argv[]=/usr/bin/podman pod rm --ignore -f --pod-id-file /run/pod-sample.pod-id ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/etc/systemd/system/pod-sample.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "pod-sample.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Thu 2021-07-29 04:40:43 MSK", "InactiveEnterTimestampMonotonic": "1802085253", "InactiveExitTimestamp": "Thu 2021-07-29 04:40:43 MSK", "InactiveExitTimestampMonotonic": "1802088854", "InvocationID": "e537ba8270804a0a88581e38636b0030", "Job": "6058", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "31538", "LimitNPROCSoft": "31538", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "31538", "LimitSIGPENDINGSoft": "31538", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "12355", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryCurrent": "847872", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "pod-sample.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/pod-sample.pid", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "container-sample-second.service container-sample-first.service system.slice sysinit.target", "Restart": "on-failure", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Thu 2021-07-29 04:40:45 MSK", "StateChangeTimestampMonotonic": "1804421152", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "2", "TasksMax": "9461", "TimeoutAbortUSec": "1min 10s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 10s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "forking", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target graphical.target", "Wants": "network.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}
META: ran handlers
META: ran handlers

PLAY RECAP ***********************************************************************************************
localhost                  : ok=8    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

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

Physical machine

@sshnaidm
Copy link
Member

Probably we need to check if 'podman_systemd_unit' is in labels. In this case we should ignore cidfile settings. And then strip 'podman_systemd_unit' from labels.

@sshnaidm sshnaidm added bug Something isn't working bug/idempotency Bug related to idempotency of modules labels Jul 30, 2021
sshnaidm added a commit to sshnaidm/ansible-podman-collections that referenced this issue Aug 2, 2021
Fix containers#276
Label 'podman_systemd_unit' is the marker for container starting
from systemd generated file. In this case:
* Ignore podman_systemd_unit label
* Ignore cidfile settings when this label presents
sshnaidm added a commit to sshnaidm/ansible-podman-collections that referenced this issue Aug 2, 2021
Fix containers#276
Label 'podman_systemd_unit' is the marker for container starting
from systemd generated file. In this case:
* Ignore podman_systemd_unit label
* Ignore cidfile settings when this label presents
@sshnaidm
Copy link
Member

sshnaidm commented Aug 2, 2021

@ivanov17 please see if #278 helps.

sshnaidm added a commit that referenced this issue Aug 2, 2021
Fix #276
Label 'podman_systemd_unit' is the marker for container starting
from systemd generated file. In this case:
* Ignore podman_systemd_unit label
* Ignore cidfile settings when this label presents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/idempotency Bug related to idempotency of modules bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants