homebrew

Homebrew package installer and provider

Gildas Cherruel

gildas

20,121 downloads

11,506 latest version

4.6 quality score

Version information

  • 0.4.16 (latest)
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.8
  • 0.4.7
  • 0.4.6
  • 0.4.5
  • 0.4.4
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
released Jan 2nd 2015
This version is compatible with:
  • Darwin

Start using this module

Tags: mac, osx, homebrew

Documentation

gildas/homebrew — version 0.4.16 Jan 2nd 2015

puppet-homebrew

Description

Homebrew for Mac OS/X package installer and provider for PuppetLabs.

=======

Overview

The Homebrew module provides manifest classes to install Homebrew as well as a package provider to install brews from homebrew.

Setup

Simply load the module via Puppet Forge:

puppet module install gildas-homebrew

Usage

Installing Homebrew

To install Homebrew, include the main class in your node definition:

Caveat:

include homebrew

Provided you already have a compiler installed!

If you do not have a compiler installed or if the compiler is out-of-date, you will want to load one with the class:

class {'homebrew':
  xcode_cli_source  => 'https://my_repo/commandline_tools_os_x_mavericks_for_xcode__march_2014.dmg',
  xcode_cli_version => '5.1',
}

Note: these 2 arguments are now optional. In that case, the installation will assume Xcode is installed properly.

  • Caveat: To download the Xcode command line tools, you must have an Apple ID.

By default, homebrew will be installed as root/wheel, which might not be the desired choice. To install on behalf of another user, use these parameters:

class {'homebrew':
  user  => gildas,
  group => brew,
}

to test if Homebrew was installed, just check the Fact has_homebrew (or has_brew)

Installing brews

To install brews, use the package provider as follows:

package {'macvim':
  ensure   => installed,
  provider => brew,
  linkapps => true, 
}

Setting linkapps to true will run "brew linkapps" once the package is installed. This is necessary if the installed application should be visible in Finder's Applications.

brew will run under the user that was used to install it.

Install-time options are given as follows:

package {'macvim':
  ensure          => installed,
  provider        => brew,
  linkapps        => true, 
  install_options => [ '--override-system-vim' ],
}

Tapping repositories

To tap into new Github repositories, simply use the tap provider:

package {'homebrew/binaries':
  ensure   => present,
  provider => tap,
}

You can untap a repository by setting ensure to absent.

Hiera configuration

If you use hiera, the puppet class homebrew will search for an entry called "packages". All packages inside that hash will get installed by the homebrew class. Note that packages are merged via the hash method in Hiera. This allows to install common packages on nodes of the same OS, then specific packages on some nodes.

E.g:

{
  "packages": {
    "homebrew/binaries": { "provider": "tap" },
    "vim": {},
    "macvim": {},
    "tree": {},
    "multitail": {}
  }
}

Authors/Contributors

Gildas Cherruel endorse

John Eckhart

Jasper Lievisse Adriaanse

Dominic Scheirlinck

Martin Skinner

License

Copyright (c) 2014 Gildas CHERRUEL (Apache License, Version 2.0)