I have a playbook like : myplaybook.yml
---
- name: call another playbook
hosts: 127.0.0.1
- include: "{{name}}-playbook.yml"
when: name is defined
Here I am passing the 'name' variable from cli as --extra-vars
It is working fine. But while trying to check the syntax with below command its giving error saying name is undefined
Ansible-playbook --syntax myplaybook.yml
Any ideas on how to handle it ?
--extra-vars?