how to get the name of current running playbook

I want to get the playbook name I performed.

ie:ansible-playbook -i hosts test.yaml

test.yaml is the playbook name I want to get. Is there a variable hold the value of “test.yaml” ?

use case:

  • name: run test cases if the playbook is test.yaml
    shell: some test command
    when: current_play == “test.yaml”

https://stackoverflow.com/questions/43069097/ansible-callbacks-get-the-name-of-the-playbook-being-executed