# Ignore error if --extra-vars is not given

**URL:** <https://forum.ansible.com/t/ignore-error-if-extra-vars-is-not-given/17152>\
**Category:** Ansible Project\
**Created:** [December 29, 2014, 5:02am UTC](https://forum.ansible.com/t/ignore-error-if-extra-vars-is-not-given/17152 "2014-12-29T05:02:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fazal-e-Rehman\_Khan](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@Fazal-e-Rehman\_Khan](https://forum.ansible.com/u/Fazal-e-Rehman_Khan)\
**Post date:** [December 29, 2014, 5:02am UTC](https://forum.ansible.com/t/ignore-error-if-extra-vars-is-not-given/17152/1 "2014-12-29T05:02:05Z")

</div>

Dear All,

Is there a way to ignore errors if extra-vars are not given at the command line. In my case, I don’t need to pass extra-vars every time I run the playbook.

Regards,  
Fazal

---

<div class="post-metadata">

**Author:** ![vaida.dan](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vaida.dan](https://forum.ansible.com/u/vaida.dan)\
**Post date:** [January 10, 2015, 1:21pm UTC](https://forum.ansible.com/t/ignore-error-if-extra-vars-is-not-given/17152/2 "2015-01-10T13:21:48Z")

</div>

If I got your question right, you should be able to use [http://docs.ansible.com/playbooks\_roles.html#role-default-variables](http://docs.ansible.com/playbooks_roles.html#role-default-variables)
