Hi@akhtar,
You can give the task name in your Ansible Playbook. Inside the task module, you will find one argument called name. This is used to give the task name. When you run your playbook you can able to see task name. I have attached one example for your reference below.
- hosts: all
vars:
- pname: "httpd"
tasks:
- name: Install httpd module
package:
name: "{{ pname }}"
state: present
register: x
- debug:
var: x.failed