Forge Home

homebrew

Homebrew package installer and provider

22,806 downloads

12,664 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'gildas-homebrew', '0.4.16'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add gildas-homebrew
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install gildas-homebrew --version 0.4.16

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: homebrew, mac, osx

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)