include_tasks accepts a when clause.
include_tasks
when
TODO: https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#conditionals-with-includes
For more details, see:
when - Conditional Task Execution
Difference between include and import