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

**URL:** <https://forum.ansible.com/t/unable-to-pass-the-value-for-a-variable-in-included-playbook-via-another-variable-in-the-calling-playbook/22870>\
**Category:** Ansible Project\
**Created:** [October 24, 2016, 3:36pm UTC](https://forum.ansible.com/t/unable-to-pass-the-value-for-a-variable-in-included-playbook-via-another-variable-in-the-calling-playbook/22870 "2016-10-24T15:36:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [October 24, 2016, 3:36pm UTC](https://forum.ansible.com/t/unable-to-pass-the-value-for-a-variable-in-included-playbook-via-another-variable-in-the-calling-playbook/22870/1 "2016-10-24T15:36:40Z")

</div>

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 ?
