# Some parameters are shown as illegal while running --check option in playbook

**URL:** <https://forum.ansible.com/t/some-parameters-are-shown-as-illegal-while-running-check-option-in-playbook/21531>\
**Category:** Ansible Project\
**Created:** [May 23, 2016, 9:52pm UTC](https://forum.ansible.com/t/some-parameters-are-shown-as-illegal-while-running-check-option-in-playbook/21531 "2016-05-23T21:52:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santosh.ghosh](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@santosh.ghosh](https://forum.ansible.com/u/santosh.ghosh)\
**Post date:** [May 23, 2016, 9:52pm UTC](https://forum.ansible.com/t/some-parameters-are-shown-as-illegal-while-running-check-option-in-playbook/21531/1 "2016-05-23T21:52:13Z")

</div>

Hi All,

I am trying to do a syntax check on all my .yaml files before running ansible-playbook. I am using version 2.0.2.0. However some modules give error saying that they are “illegal parameters” in an Ansible play.

I am using role based system and these “illegal parameters” are in my roles/ROLENAME/tasks/main.yaml files. Examples of these parameters are fail,register. However the funny thing is that the playbook runs absolutely fine. Only when i do ansible-playbook myYAMLFILE.yaml --check do I get these errors. Sample errors:

ERROR: fail is not a legal parameter of an Ansible Play

ERROR: register is not a legal parameter of an Ansible Play

Sample playbook:

---

<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:** [May 25, 2016, 9:33pm UTC](https://forum.ansible.com/t/some-parameters-are-shown-as-illegal-while-running-check-option-in-playbook/21531/2 "2016-05-25T21:33:09Z")

</div>

what you are showing is NOT a play, but a task list, you need a play (normally - hosts: )
