# global config file

**URL:** <https://forum.ansible.com/t/global-config-file/11624>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [June 22, 2012, 1:40pm UTC](https://forum.ansible.com/t/global-config-file/11624 "2012-06-22T13:40:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [June 22, 2012, 1:40pm UTC](https://forum.ansible.com/t/global-config-file/11624/1 "2012-06-22T13:40:59Z")

</div>

Yeah, I think it’s reasonable as there are enough settings now.

If it reads from ~/.ansible/ansible.cfg before /etc/ansible/ansible.cfg or something, and does not require either file to exist or raise any warnings about it not existing, that’s reasonable.

Packaging should also not include a config file, and any environment variables, if set, should override the configuration values.

So basically make “constants.py” work in this order to preserve compatibility:

(1) environment variable  
(2) config file if present – first file found  
(3) default value
