# Override configuration file

**URL:** <https://forum.ansible.com/t/override-configuration-file/18046>\
**Category:** Ansible Project\
**Created:** [April 22, 2015, 7:57am UTC](https://forum.ansible.com/t/override-configuration-file/18046 "2015-04-22T07:57:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tzach\_Livyatan1](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@Tzach\_Livyatan1](https://forum.ansible.com/u/Tzach_Livyatan1)\
**Post date:** [April 22, 2015, 7:57am UTC](https://forum.ansible.com/t/override-configuration-file/18046/1 "2015-04-22T07:57:23Z")

</div>

Hello  
I need to override only two configuration parameters (- sudo\_flags, ssh\_args).  
Can I do it without updating the global ansible.cfg, and without copy the full file locally?

Thanks  
Tzach

---

<div class="post-metadata">

**Author:** ![Tzach\_Livyatan1](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@Tzach\_Livyatan1](https://forum.ansible.com/u/Tzach_Livyatan1)\
**Post date:** [April 22, 2015, 11:57am UTC](https://forum.ansible.com/t/override-configuration-file/18046/2 "2015-04-22T11:57:00Z")

</div>

Answering myself:  
One option is to use env vars as follow:

export DEFAULT\_SU\_FLAGS=“-HE”  
export ANSIBLE\_SSH\_ARGS=“-o ForwardAgent=yes”

The variables are listed at lib/ansible/constants.py
