In addition, I suggest you read this, http://docs.ansible.com/ansible/latest/playbooks_reuse.html and try to use roles in this case, this will help in this case when you are trying to enable / import several players into one main book. And about passing the value to the include statement, you can add it to the vars main.yml roles. Or, if the variable you want to pass is the result of the previous task in one main play, use "register" and save the output in the variable.
- debug: msg="{{result.stdout_lines}}"
here, the result is a registered variable. Use the debugging module to know exactly what you want to transfer to the playbook. Hope this helps.
source share