All Projects → TheKevJames → puppet-homebrew

TheKevJames / puppet-homebrew

Licence: Apache-2.0 license
homebrew (+brewcask! +taps!) package installer and provider

Programming Languages

ruby
36898 projects - #4 most used programming language
Puppet
460 projects
shell
77523 projects

Projects that are alternatives of or similar to puppet-homebrew

Homebrew Command Not Found
🔍 Ubuntu’s command-not-found equivalent for Homebrew on macOS
Stars: ✭ 236 (+1288.24%)
Mutual labels:  homebrew, tap
action-homebrew-bump-formula
⚙️ A GitHub Action to easily bump Homebrew formula on new release
Stars: ✭ 68 (+300%)
Mutual labels:  homebrew, tap
Brew
🍺🐧 The Homebrew package manager for Linux
Stars: ✭ 2,600 (+15194.12%)
Mutual labels:  homebrew, brew
Homebrew Terraforms
Homebrew repository for a Terraform version switcher and all Terraform versions
Stars: ✭ 174 (+923.53%)
Mutual labels:  homebrew, tap
homebrew-srm
Homebrew tap for srm since Apple and Homebrew decided nobody had mechanical disks anymore.
Stars: ✭ 14 (-17.65%)
Mutual labels:  homebrew, tap
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: ✭ 181 (+964.71%)
Mutual labels:  homebrew, brew
homebrew-apple-fonts
Easily install Apples fonts using homebrew.
Stars: ✭ 12 (-29.41%)
Mutual labels:  homebrew, tap
Homebrew Livecheck
💀 Homebrew/homebrew-livecheck (deprecated)
Stars: ✭ 104 (+511.76%)
Mutual labels:  homebrew, tap
homebrew-mopidy
Homebrew formulas for Mopidy and Mopidy extensions
Stars: ✭ 21 (+23.53%)
Mutual labels:  homebrew, tap
homebrew-ecmascript
Homebrew formulae for ECMAScript engines
Stars: ✭ 13 (-23.53%)
Mutual labels:  homebrew, tap
Aliddns
aliyun ddns for golang【阿里云DDNS服务,用来将自己的动态IP同步到自己的域名解析服务器,安装方便,配置简单,默认支持Linux和MacOS以后台服务方式持续运行】
Stars: ✭ 136 (+700%)
Mutual labels:  homebrew, brew
homebrew-portable-ruby
🚗 Versions of Ruby that can be installed and run from anywhere on the filesystem.
Stars: ✭ 96 (+464.71%)
Mutual labels:  homebrew, tap
Homebrew Services
🚀 Manage background services with macOS' launchctl daemon manager
Stars: ✭ 1,656 (+9641.18%)
Mutual labels:  homebrew, tap
Ansible Role Homebrew
Ansible Role - Homebrew
Stars: ✭ 195 (+1047.06%)
Mutual labels:  homebrew, brew
Kymsu
Keep Your macOs Stuff Updated (KYMSU)
Stars: ✭ 119 (+600%)
Mutual labels:  homebrew, brew
Iterm Fish Fisher Osx
Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes
Stars: ✭ 249 (+1364.71%)
Mutual labels:  homebrew, brew
Dotfiles
Get started with your own dotfiles.
Stars: ✭ 1,094 (+6335.29%)
Mutual labels:  homebrew, brew
Homebrew Core
🍻 Default formulae for the missing package manager for macOS (or Linux)
Stars: ✭ 10,450 (+61370.59%)
Mutual labels:  homebrew, tap
.config
⚙️ Bootstrappable user environment for macOS & Ubuntu
Stars: ✭ 31 (+82.35%)
Mutual labels:  homebrew, brew
macstrap
Set up your macOS from scratch.
Stars: ✭ 16 (-5.88%)
Mutual labels:  homebrew, brew

puppet-homebrew

A Puppet Module to install Homebrew and manage Homebrew packages on Mac OSX. This module can install using either homebrew or brewcask, along with a fallback mode which attempts both.

This module supports Puppet version 4 and greater running on Ruby version 1.8.3 and greater. Note that versions of Ruby from 2.0.x to 2.2.x may no longer be supported by Homebrew. For Puppet 3 support, please pin to version 1.7.1.

puppet-homebrew is available on the Puppet Forge.

Usage

Installing Packages

Use the Homebrew package provider like this:

class hightower::packages {
  pkglist = ['postgresql', 'nginx', 'git', 'tmux']

  package { $pkglist:
    ensure   => present,
    provider => brew,
  }
}

The providers works as follows:

  • provider => brew: install using brew install <module>. Do not use brewcask.
  • provider => brewcask: install using brew cask install <module>. Only use brewcask.
  • provider => homebrew: attempt to install using brew install <module>. On failure, use brew cask install <module>

Tapping Repositories

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

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

You can untap a repository by setting ensure to absent.

Ordering Taps

When both tapping a repo and installing a package from that repository, it is important to make sure the former happens first. This can be accomplished in a few different ways: either by doing so on a per-package basis:

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

or by setting all taps to occur before all other usages of this package with Resource Collectors:

# pick whichever provider(s) are relevant
Package <| provider == tap |> -> Package <| provider == homebrew |>
Package <| provider == tap |> -> Package <| provider == brew |>
Package <| provider == tap |> -> Package <| provider == brewcask |>

Installing Brew

To install homebrew on a node (with a compiler already present!):

class { 'homebrew':
  user      => 'hightower',
  group     => 'developers',  # defaults to 'admin'
  multiuser => false,         # set to true to enable multiuser support for homebrew
}

Installing homebrew as the root user is no longer supported (as of late 2016). Please ensure you install brew as a standard (non-root) user.

Note that some users have reported confusion between the puppet user and the homebrew user -- it is perfectly fine to run puppet as root, in fact this is encouraged, but the homebrew user must be non-root (generally, the system's main user account).

If you run puppet as a non-root user and set the homebrew::user to a different non-root user, you may run into issues; namely, since this module requires the puppet user act as the homebrew user, you may get a password prompt on each run. This can be fixed by allowing the puppet user passwordless sudo privileges to the homebrew user.

If you are looking for a multi-user installation, please be sure to set the multi-user flag, eg.:

class { 'homebrew':
  user      => 'kevin',
  group     => 'all-users',
  multiuser => true,
}

To install homebrew and a compiler (on Lion or later), eg.:

class { 'homebrew':
  user                       => 'kevin',
  command_line_tools_package => 'command_line_tools_for_xcode_os_x_lion_april_2013.dmg',
  command_line_tools_source  => 'http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg',
}

N.B. the author of this module does not maintain a mirror to command_line_tools. You may need to search for a copy if you use this method. At the time of this writing, downloading the command line tools sometimes requires an Apple ID. Sorry, dude!

Adding a Github Token

Homebrew uses a Github token in your environment to make your experience better by:

  • Reducing the rate limit on brew search commands
  • Letting you tap your private repositories
  • Allowing you to upload Gists of brew installation errors

To enable this feature, you can include:

class { 'homebrew':
  user         => 'kevin',
  github_token => 'MyT0k3n!',
}

Here's a link to create a personal access token for Github.

Original Author

Original credit for this module goes to kelseyhightower. This module was forked to provide brewcask integration.

Credit for logic involved in tapping repositories goes to gildas.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].