Puppet Class: vagrant::bash
- Defined in:
- manifests/bash.pp
Overview
Class: vagrant::bash
Install bash completion for vagrant
Examples
include vagrant::bash
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'manifests/bash.pp', line 9
class vagrant::bash (
$completion_dir = undef
) {
include vagrant
if $completion_dir == undef {
case $::operatingsystem {
centos, redhat, fedora, debian, ubuntu: {
$basedir = '/etc/bash_completion.d'
}
darwin: {
$basedir = '/usr/local/etc/bash_completion.d'
}
windows: {
fail("Unsupported operating system to install bash completion: ${::operatingsystem}")
}
default: {
fail("Unrecognized operating system: ${::operatingsystem}")
}
}
} else {
$basedir = $completion_dir
}
file { "${basedir}/vagrant.sh":
ensure => link,
target => "/opt/vagrant/embedded/gems/gems/vagrant-${vagrant::version}/contrib/bash/completion.sh",
require => Class['vagrant']
}
}
|