Skip to content

Instantly share code, notes, and snippets.

@nanliu
Last active December 14, 2015 16:08
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nanliu/5112530 to your computer and use it in GitHub Desktop.
Homebrew::Tap for boxen PoC
define homebrew::tap (
$ensure = present,
) {
if $ensure == 'present' {
exec { "homebrew_tap_${name}":
command => "brew tap ${name}",
unless => "brew tap | grep ${name}",
}
} else {
exec { "homebrew_untap_${name}":
command => "brew untap ${name}",
onlyif => "brew tap | grep ${name}",
}
}
}
homebrew::tap { 'homebrew/games': }
package { 'homebrew/games/nethack':
ensure => present,
require => Homebrew::Tap['homebrew/games'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment