what is mean by play and what's the diffrence plays vs tasks, example please?

Hi All,

Can you please explain me what is play and play vs tasks .

Could you give any example for play.

Thanks & Regards
ChandraMohan

tasks are actions to be performed, a play is a mapping between a list
of hosts and list of tasks.

Normally you can recognize a play as it is the only thing that has a
`hosts:` keyword, tasks always belong inside a play, normally under
the tasks: keyword.

- name: this is a play
  hosts: all
  tasks:
    - name: this is a task
       debug: msg=this is a task

Tasks can be put in more places other than the tasks keyword, but they
always need to be inside a play to be executed. i.e they can be in a
role, but the role must be in a play.