Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Only tap homebrew/completions when $completion parameter is set to true
Browse files Browse the repository at this point in the history
When we `include vagrant`, $completion will default to false and the
`vagrant-completion` package will not be installed.  `homebrew/completions` will
be taped nonetheless, however. This is not necessary. Change the manifest to
only tap `homebrew-versions` if $completion is true.
  • Loading branch information
sebroeder committed Apr 24, 2015
1 parent e65f294 commit fcdc197
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
) {
validate_bool($completion)

$ensure_pkg = $completion ? {
$ensure_completion = $completion ? {
true => 'present',
default => 'absent',
}
Expand All @@ -26,10 +26,12 @@
require => Package["Vagrant_${version}"],
}

homebrew::tap { 'homebrew/completions': }
homebrew::tap { 'homebrew/completions':
ensure => $ensure_completion,
}

package { 'vagrant-completion':
ensure => $ensure_pkg,
ensure => $ensure_completion,
provider => 'homebrew',
require => Homebrew::Tap['homebrew/completions'],
}
Expand Down

0 comments on commit fcdc197

Please sign in to comment.