Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Add install options to packages #33

Closed
wants to merge 3 commits into from
Closed

Add install options to packages #33

wants to merge 3 commits into from

Conversation

imjoshholloway
Copy link

This resolves #31 by allowing you to specify a dict of packages and options in the variables whilst maintaining backward compatibility:

...

homebrew_installed_packages:
  - vim

homebrew_package_options:
  vim:
    - with-lua
    - with-luajit

...

@autoferrit
Copy link

Are there any plans on getting this merged in? Or any updates?

@autoferrit
Copy link

I think, to fix this, there just needs to be a new line:

homebrew_package_options:

making the final file look like:

---
homebrew_install_path: /usr/local
homebrew_brew_bin_path: /usr/local/bin

homebrew_installed_packages:
  - ssh-copy-id
  - pv

homebrew_package_options:

homebrew_upgrade_all_packages: no

homebrew_taps:
  - caskroom/cask

homebrew_cask_apps:
  - firefox

homebrew_cask_appdir: /Applications

homebrew_use_brewfile: true
homebrew_brewfile_dir: '~

This change makes it work locally.

@oxyc
Copy link
Contributor

oxyc commented May 8, 2017

How about

# Brew.
- name: Ensure configured homebrew packages are installed.
  homebrew:
    name: "{{ item.name|default(item) }}"
    install_options: "{{ item.install_options|default(omit) }}"
    state: "{{ item.state|default('present') }}"
  with_items: "{{ homebrew_installed_packages }}"

@geerlingguy
Copy link
Owner

@oxyc - I like that suggestion... and it would probably also be nice to do that for the geerlingguy.nodejs role which uses a similar structure.

If it were set up like that, I would be happy to merge.

@oxyc
Copy link
Contributor

oxyc commented May 8, 2017

@geerlingguy I already opened up a PR :) #69 (oops linked wrong at first)

@geerlingguy
Copy link
Owner

Closing in favor of #69 – that method feels a little more clean and expands the existing functionality an a slightly simpler way.

@geerlingguy geerlingguy closed this May 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to pass compilation flags to installers
4 participants