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