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”