You wrote a tasklist and tried to run it as a playbook.
When you have a playbook, you can have a tasks
key in a given play, and list your preferred task there.
---
- hosts: your hosts
tasks:
- name: delete sg
file:
path: "/tmp/{{ item }}"
state: absent
recurse: no
...