# Multiple Checks via single task

**URL:** <https://forum.ansible.com/t/multiple-checks-via-single-task/27931>\
**Category:** Ansible Project\
**Created:** [July 2, 2018, 2:48pm UTC](https://forum.ansible.com/t/multiple-checks-via-single-task/27931 "2018-07-02T14:48:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vino\_B](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@Vino\_B](https://forum.ansible.com/u/Vino_B)\
**Post date:** [July 2, 2018, 2:48pm UTC](https://forum.ansible.com/t/multiple-checks-via-single-task/27931/1 "2018-07-02T14:48:56Z")

</div>

Hi All,

Request your help on how to perform the below check via a single task in ansible playbook

Check whether the hostname is fully qualified domain name : hostname -f  
if exist then check

Check the IP address of the doamin name : nslookup `hostname -f``  
if exist then check

Check whether the IP address and the Fully qualified domain name exist in the /etc/host file.

From,  
Vino.B

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 2, 2018, 3:45pm UTC](https://forum.ansible.com/t/multiple-checks-via-single-task/27931/2 "2018-07-02T15:45:43Z")

</div>

It's not possible to do in a single task, you need several tasks.
