Details regarding the update_homebrew option

37 views
Skip to first unread message

Dan Bohea

unread,
Aug 26, 2014, 7:22:16 AM8/26/14
to ansible...@googlegroups.com
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.

Michael DeHaan

unread,
Aug 26, 2014, 8:48:43 AM8/26/14
to ansible...@googlegroups.com
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.




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/75f292d9-7bfa-4c08-9a17-cc6f4a3c8a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Bohea

unread,
Aug 26, 2014, 8:50:50 AM8/26/14
to ansible...@googlegroups.com
Thanks for the advice.
Reply all
Reply to author
Forward
0 new messages