# Call async\_status & python script in one task (Failed error message)

**URL:** <https://forum.ansible.com/t/call-async-status-python-script-in-one-task-failed-error-message/37684>\
**Category:** Ansible Developer\
**Created:** [February 21, 2023, 8:31am UTC](https://forum.ansible.com/t/call-async-status-python-script-in-one-task-failed-error-message/37684 "2023-02-21T08:31:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha0021997](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@neha0021997](https://forum.ansible.com/u/neha0021997)\
**Post date:** [February 21, 2023, 8:31am UTC](https://forum.ansible.com/t/call-async-status-python-script-in-one-task-failed-error-message/37684/1 "2023-02-21T08:31:33Z")

</div>

Hi Team,

Below are the two tasks which I am including in playbook. Main agenda is that, when my packages are installing, at that time rather than just getting waiting or retried message, I wanted some customised message to print as well. That xustomized message, I am retrieving from python script (in 2nd task)

**- name: Ensure packages are installed**  
**yum:**  
**name:**  
**- xorg-x11-server\***  
**- dhcp**  
**- bind**  
**- vsftpd**  
**- dovecot**  
**state: present**  
**async: 86400 #24 hours**  
**poll: 0**  
**register: yum\_installer**

**- name: Waiting for yum package installation to complete**  
**async\_status: jid={{ yum\_installer.ansible\_job\_id }}**  
**shell: python /opt/ibm/si/saas/ansible/test\_neha.py**  
**register: console\_job\_results**  
**until: console\_job\_results.finished**  
**retries: 100**  
**delay: 10**

But I am getting the error **ERROR! conflicting action statements: shell, async\_status** here. Can you please suggest something, what should be the next thing to do here. I really need some customised message to print, which I am retrieving from python script. Is there any way to include both async\_status & python script module in one task.

Thanks  
Neha Singh
