Puppet Class: r10k::install::bundle

Defined in:
manifests/install/bundle.pp

Summary

This class installs the r10k bundle

Overview

Parameters:

  • revision (String[1]) (defaults to: 'master')
  • source (String[1]) (defaults to: 'https://github.com/adrienthebo/r10k.git')


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/install/bundle.pp', line 6

class r10k::install::bundle (
  String[1] $revision = 'master',
  String[1] $source   = 'https://github.com/adrienthebo/r10k.git',
) {
  # The bundle install has prefix support as of writing this, I want bleeding edge.
  package { "${module_name}-bundle":
    ensure   => installed,
    name     => 'bundler',
    provider => 'gem',
  }
  vcsrepo { "${module_name}-r10k-github":
    ensure   => latest,
    provider => 'git',
    path     => '/tmp/r10k',
    source   => $source,
    revision => $revision,
  }
  exec { "${module_name}-install-via-bundle":
    command => 'bundle && bundle install --path /opt/ --binstubs /usr/local/bin/',
    cwd     => '/tmp/r10k',
    require => [Package["${module_name}-bundle"], Vcsrepo["${module_name}-r10k-github"]],
    unless  => 'bundle list | grep -q " r10k "',
    path    => $::facts['path'],
  }
}