# Changing defaults for modules like pip

**URL:** <https://forum.ansible.com/t/changing-defaults-for-modules-like-pip/13399>\
**Category:** Ansible Project\
**Created:** [August 31, 2013, 2:03pm UTC](https://forum.ansible.com/t/changing-defaults-for-modules-like-pip/13399 "2013-08-31T14:03:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Berger](https://avatars.discourse-cdn.com/v4/letter/o/5f9b8f/32.png) [@Oliver\_Berger](https://forum.ansible.com/u/Oliver_Berger)\
**Post date:** [August 31, 2013, 2:03pm UTC](https://forum.ansible.com/t/changing-defaults-for-modules-like-pip/13399/1 "2013-08-31T14:03:14Z")

</div>

Hello,

I have a bunch of playbooks where "suddenly" while setting up a new  
machine it turned out, that pip is not working correctly anymore with  
use\_mirrors=yes (it is eating a lot of RAM and CPU goes to 100%). So I  
had to append use\_mirrors=no to all pip actions... that was not much  
in my case, but I can imagine that in larger setups such a thing would  
be annoying and not everybody wants to touch working playbooks for  
just "fixing" a problem with default values...

Is there a way (if not consider this as a proposition) to globally  
change or setup the default values for certain actions/commands/modules?

My Idea is like this:

in ansible.cfg put a line like this:

[defaults]  
hostfile = hosts.ini  
defaults = defaults.yml

may be its also worth of supporting a cmd-line option,  
e.g. --defaults defaults.yml

where defaults.yml contains a subset of module/action options, e.g.

- ---  
pip:  
&nbsp;&nbsp;use\_mirrors: no

best regards  
Oliver

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 31, 2013, 11:12pm UTC](https://forum.ansible.com/t/changing-defaults-for-modules-like-pip/13399/2 "2013-08-31T23:12:36Z")

</div>

There is not.

I’m not sure why pip is acting weird for you, is there an upstream bug filed on pip about that?
