Last active
December 14, 2015 16:08
-
-
Save nanliu/5112530 to your computer and use it in GitHub Desktop.
Homebrew::Tap for boxen PoC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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