# Ansible.builtin.async\_status throwing error in Ansible 2.19

**URL:** <https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944>\
**Category:** Get Help\
**Tags:** templating\
**Created:** [July 18, 2025, 11:13am UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944 "2025-07-18T11:13:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trisha-dell](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/trisha-dell/32/8640_2.png) [@trisha-dell](https://forum.ansible.com/u/trisha-dell)\
**Post date:** [July 18, 2025, 11:13am UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/1 "2025-07-18T11:13:15Z")

</div>

While executing the following task, an error is observed:

```
- name: Wait for instance(s) creation to complete
  become: "{{ not item.item.rootless | default(omit) }}"
  ansible.builtin.async_status:
    jid: "{{ item.ansible_job_id }}"
  register: podman_jobs
  until: podman_jobs.finished
  retries: 300
  with_items: "{{ server.results }}"
  loop_control:
    label: "{{ item.item.name | default('Unnamed') }}"

```

Error:  
“msg”: “Elements value for option ‘cmd\_args’ is of type NoneType and we were unable to convert to str: ‘None’ is not a string and conversion is not allowed”,  
“results\_file”: “/root/.ansible\_async/j843353491924.4157701”,  
“started”: true,  
“stderr”: “”,  
“stderr\_lines”: ,  
“stdout”: “”,  
“stdout\_lines”:

Invocation:  
{  
“module\_args”: {  
“annotation”: null,  
“arch”: null,  
“attach”: null,  
“authfile”: null,  
“blkio\_weight”: null,  
“blkio\_weight\_device”: null,  
“cap\_add”: null,  
“cap\_drop”: null,  
“cgroup\_conf”: null,  
“cgroup\_parent”: null,  
“cgroupns”: null,  
“cgroups”: null,  
“chrootdirs”: null,  
“cidfile”: null,  
“cmd\_args”: ,  
“command”: “/sbin/init”,  
“conmon\_pidfile”: null,  
“cpu\_period”: null,  
“cpu\_quota”: null,  
“cpu\_rt\_period”: null,  
“cpu\_rt\_runtime”: null,  
“cpu\_shares”: null,  
“cpus”: null,  
“cpuset\_cpus”: null,  
“cpuset\_mems”: null,  
“debug”: false,  
“decryption\_key”: null,  
“delete\_depend”: null,  
“delete\_time”: null,  
“delete\_volumes”: null,  
“detach”: true,  
“detach\_keys”: null,  
“device”: null,  
“device\_cgroup\_rule”: null,  
“device\_read\_bps”: null,  
“device\_read\_iops”: null,  
“device\_write\_bps”: null,  
“device\_write\_iops”: null,  
“dns”: null,  
“dns\_option”: null,  
“dns\_search”: null,  
“entrypoint”: null,  
“env”: null,  
“env\_file”: null,  
“env\_host”: null,  
“env\_merge”: null,  
“etc\_hosts”: null,  
“executable”: “podman”,  
“expose”: null,  
“force\_delete”: true,  
“force\_restart”: false,  
“generate\_systemd”: {},  
“gidmap”: null,  
“gpus”: null,  
“group\_add”: null,  
“group\_entry”: null,  
“health\_startup\_cmd”: null,  
“health\_startup\_interval”: null,  
“health\_startup\_retries”: null,  
“health\_startup\_success”: null,  
“health\_startup\_timeout”: null,  
“healthcheck”: null,  
“healthcheck\_failure\_action”: null,  
“healthcheck\_interval”: null,  
“healthcheck\_retries”: null,  
“healthcheck\_start\_period”: null,  
“healthcheck\_timeout”: null,  
“hooks\_dir”: null,  
“hostname”: “centos”,  
“hostuser”: null,  
“http\_proxy”: null,  
“image”: “molecule\_local/quay.io/centos/centos:stream10”,  
“image\_strict”: false,  
“image\_volume”: null,  
“init”: null,  
“init\_ctr”: null,  
“init\_path”: null,  
“interactive”: null,  
“ip”: null,  
“ip6”: null,  
“ipc”: null,  
“kernel\_memory”: null,  
“label”: {  
“owner”: “molecule”  
},  
“label\_file”: null,  
“log\_driver”: null,  
“log\_level”: null,  
“log\_opt”: null,  
“mac\_address”: null,  
“memory”: null,  
“memory\_reservation”: null,  
“memory\_swap”: null,  
“memory\_swappiness”: null,  
“mount”: null,  
“name”: “centos”,  
“network”: null,  
“network\_aliases”: null,  
“no\_healthcheck”: null,  
“no\_hosts”: null,  
“oom\_kill\_disable”: null,  
“oom\_score\_adj”: null,  
“os”: null,  
“passwd”: null,  
“passwd\_entry”: null,  
“personality”: null,  
“pid”: null,  
“pid\_file”: null,  
“pids\_limit”: null,  
“platform”: null,  
“pod”: null,  
“pod\_id\_file”: null,  
“preserve\_fd”: null,  
“preserve\_fds”: null,  
“privileged”: true,  
“publish”: null,  
“publish\_all”: null,  
“pull”: null,  
“quadlet\_dir”: null,  
“quadlet\_file\_mode”: null,  
“quadlet\_filename”: null,  
“quadlet\_options”: null,  
“rdt\_class”: null,  
“read\_only”: null,  
“read\_only\_tmpfs”: null,  
“recreate”: false,  
“requires”: null,  
“restart\_policy”: null,  
“restart\_time”: null,  
“retry”: null,  
“retry\_delay”: null,  
“rm”: null,  
“rmi”: null,  
“rootfs”: null,  
“sdnotify”: null,  
“seccomp\_policy”: null,  
“secrets”: null,  
“security\_opt”: null,  
“shm\_size”: null,  
“shm\_size\_systemd”: null,  
“sig\_proxy”: null,  
“state”: “started”,  
“stop\_signal”: null,  
“stop\_time”: null,  
“stop\_timeout”: null,  
“subgidname”: null,  
“subuidname”: null,  
“sysctl”: null,  
“systemd”: null,  
“timeout”: null,  
“timezone”: null,  
“tls\_verify”: null,  
“tmpfs”: null,  
“tty”: null,  
“uidmap”: null,  
“ulimit”: null,  
“umask”: null,  
“unsetenv”: null,  
“unsetenv\_all”: null,  
“user”: null,  
“userns”: null,  
“uts”: null,  
“variant”: null,  
“volume”: [  
“/tmp:/tmp”  
],  
“volumes\_from”: null,  
“workdir”: null  
}  
}

This task is part of the podman molecule plugin.

How can this be fixed?

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [July 18, 2025, 11:32am UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/2 "2025-07-18T11:32:44Z")

</div>

[@Core](https://forum.ansible.com/groups/core) ^ (some random text to reach 20 letters…)

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [July 18, 2025, 5:16pm UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/3 "2025-07-18T17:16:11Z")

</div>

I’m only able to reproduce that error by passing a list containing `None` to the argument `cmd_args`. But this fails on 2.18, as well as 2.19, so I think I’m missing important details. Here’s my reproducer:

```auto
- hosts: localhost
  gather_facts: no
  tasks:
    - containers.podman.podman_container:
        image: quay.io/centos/centos:stream10
        name: centos
        cmd_args:
          - ~
      async: 45
      poll: 0
      register: async_result

    - async_status: # fails with the same error as shown
        jid: "{{ async_result.ansible_job_id }}"
      register: job_result
      until: job_result.finished
      retries: 5
      delay: 10

```

---

<div class="post-metadata">

**Author:** ![trisha-dell](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/trisha-dell/32/8640_2.png) [@trisha-dell](https://forum.ansible.com/u/trisha-dell)\
**Post date:** [July 19, 2025, 6:28am UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/4 "2025-07-19T06:28:12Z")

</div>

If cmd\_args is not passed (as mentioned in the playbook task), it is an empty list, which is throwing an error in 2.19 but not in 2.18.

I am using the molecule podman plugin to execute molecule testcases for roles.

Following is the repository and the command I have used.

repository: [GitHub - dell/dellemc-openmanage-ansible-modules: Dell OpenManage Ansible Modules](https://github.com/dell/dellemc-openmanage-ansible-modules)

The following command is part of the idrac\_gatherfacts role.  
molecule -vvvv -e /root/.env.yml --base-config ../molecule.yml test -s backplane-10633

I had installed molecule and molecule-plugins[podman] for this execution.

Am I missing something here?

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [July 21, 2025, 5:12pm UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/5 "2025-07-21T17:12:34Z")

</div>

Can you link the failing task in the role, please? Not the async\_status task, the task it’s checking, which is the source of the error.

> This task is part of the podman molecule plugin.

I don’t know what that is, linking would help.

I cannot trigger it with an empty list, and the error message from async\_status doesn’t mean it’s not a list containing `None`, because invalid elements won’t be added to the validated argument spec.

Does the task work if you pass [“”] to cmd\_args? That could explain it potentially, since prior to 2.19, `None` could be converted to an empty string by templating.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [July 22, 2025, 4:40pm UTC](https://forum.ansible.com/t/ansible-builtin-async-status-throwing-error-in-ansible-2-19/43944/6 "2025-07-22T16:40:14Z")

</div>

Someone else reported this same issue to [Latest release (2.19.0) breaks molecule · Issue #85515 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/85515) and it was diagnosed today as expected behavior change in 2.19 that will require changes to the playbook. That above issue is closed since it needs to be reported and fixed in the molecule-plugins repo, but the comment in the issue explains the change that needs to be made.
