# \--syntax-ckeck won't check syntax from variable-included files

**URL:** <https://forum.ansible.com/t/syntax-ckeck-wont-check-syntax-from-variable-included-files/23039>\
**Category:** Ansible Project\
**Created:** [November 16, 2016, 10:09am UTC](https://forum.ansible.com/t/syntax-ckeck-wont-check-syntax-from-variable-included-files/23039 "2016-11-16T10:09:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Faucher](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@Thomas\_Faucher](https://forum.ansible.com/u/Thomas_Faucher)\
**Post date:** [November 16, 2016, 10:09am UTC](https://forum.ansible.com/t/syntax-ckeck-wont-check-syntax-from-variable-included-files/23039/1 "2016-11-16T10:09:22Z")

</div>

Hello,

I noticed that --syntax-check won't check the syntax from included files  
if the include statement is based on a variable.

I have an include statement such as:

$ head -n 3 roles/mongodb/tasks/main.yml

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 16, 2016, 7:32pm UTC](https://forum.ansible.com/t/syntax-ckeck-wont-check-syntax-from-variable-included-files/23039/2 "2016-11-16T19:32:33Z")

</div>

It cannot check syntax of dynamically included files, this would also affect include and include\_roles. Since those would need actually executing the tasks.
