# Details regarding the update\_homebrew option

**URL:** <https://forum.ansible.com/t/details-regarding-the-update-homebrew-option/16038>\
**Category:** Ansible Project\
**Created:** [August 26, 2014, 11:22am UTC](https://forum.ansible.com/t/details-regarding-the-update-homebrew-option/16038 "2014-08-26T11:22:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Bohea](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Dan\_Bohea](https://forum.ansible.com/u/Dan_Bohea)\
**Post date:** [August 26, 2014, 11:22am UTC](https://forum.ansible.com/t/details-regarding-the-update-homebrew-option/16038/1 "2014-08-26T11:22:16Z")

</div>

I have a question about the homebrew module.

Consider the following task:

`

- name: Install rbenv & ruby-build  
homebrew: name={{ item }} update\_homebrew=yes  
with\_items:
- rbenv
- ruby-build

`

This uses homebrew to install 2 packages. The “update\_homebrew” option is set to “yes” which according to the docs will update homebrew itself first.

My question is will it update homebrew before _each_ package (e.g. twice in my example)? The above task can be pretty slow so I’m starting to think that this may be happening.

If that’s the case then I may be better off updating homebrew once (pre\_task?), in advance of installing packages, especially if I’m going to be installing quite a few.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 26, 2014, 12:48pm UTC](https://forum.ansible.com/t/details-regarding-the-update-homebrew-option/16038/2 "2014-08-26T12:48:40Z")

</div>

I would just call update\_homebrew on the first task.

Many of our modules, such as apt, allow updating the cache without installing a package, which makes a first step somewhat cleaner.

The homebrew one is a bit more bare bones ATM, and a name is required, so I’d just call it on the first one for now.

---

<div class="post-metadata">

**Author:** ![Dan\_Bohea](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Dan\_Bohea](https://forum.ansible.com/u/Dan_Bohea)\
**Post date:** [August 26, 2014, 12:50pm UTC](https://forum.ansible.com/t/details-regarding-the-update-homebrew-option/16038/3 "2014-08-26T12:50:50Z")

</div>

Thanks for the advice.
