Puppet Class: psick::vagrant

Defined in:
manifests/vagrant.pp

Overview

This class installs Varant using the unibet/vagrant module

Parameters:

  • version (Variant[Undef,String]) (defaults to: undef)

    The Vagrant version to install

  • plugins (Array) (defaults to: [])

    An array of Vagrant plugins to install

  • default_plugins (Array) (defaults to: [ 'vagrant-vbguest' , 'vagrant-cachier' ])

    An array of Vagrant plugins installed by default

  • The

    user to use for plugins installation

  • user (String) (defaults to: 'root')
  • manage (Boolean) (defaults to: $::psick::manage)
  • noop_manage (Boolean) (defaults to: $::psick::noop_manage)
  • noop_value (Boolean) (defaults to: $::psick::noop_value)


8
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
# File 'manifests/vagrant.pp', line 8

class psick::vagrant (
  Variant[Undef,String] $version = undef,
  Array $plugins         = [] ,
  Array $default_plugins = [ 'vagrant-vbguest' ,  'vagrant-cachier' ],
  String $user           = 'root',

  Boolean $manage        = $::psick::manage,
  Boolean $noop_manage   = $::psick::noop_manage,
  Boolean $noop_value    = $::psick::noop_value,
) {

  if $manage {
    if $noop_manage {
      noop($noop_value)
    }
    class { '::vagrant':
      version => $version,
    }

    $all_plugins = $default_plugins + $plugins

    $all_plugins.each | $plugin | {
      ::vagrant::plugin { $plugin:
        user => $user,
      }
    }
  }
}