Unable to pass the value for a variable in included playbook via another variable in the calling playbook

I have a playbook which requires to perform some actions for each string in a comma separated list. So i put the repeatable tasks in another playbook and included that in a master playbook using with_items:

  • include:included.yaml module=“{{item}}”
    with_items: “{{modules.split(‘,’)}}”

The included playbook uses the value of module but with the way i am calling it, it is not getting the value in var module. I have tried many variations to this like:

  • include: install_service.yaml
    vars:
    module=“{{item}}”
    with_items: “{{modules.split(‘,’)}}”

But none of them works. What is it that i am doing wrong here ?