Sha256: 6aac2a2111c28d7f292387d3f81878abe41f3e5921b670b89bf34172d5dad894

Contents?: true

Size: 880 Bytes

Versions: 12

Compression:

Stored size: 880 Bytes

Contents

define rbenv::definition(
  $user,
  $source,
  $ruby  = $title,
  $group = $user,
  $home  = '',
  $root  = ''
) {

  $home_path = $home ? { '' => "/home/${user}",       default => $home }
  $root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }

  $destination = "${root_path}/plugins/ruby-build/share/ruby-build/${ruby}"

  if $source =~ /^puppet:/ {
    file { "rbenv::definition-file ${user} ${ruby}":
      ensure  => file,
      source  => $source,
      group   => $group,
      path    => $destination,
      require => Exec["rbenv::plugin::checkout ${user} ruby-build"],
    }
  } elsif $source =~ /http(s)?:/ {
    exec { "rbenv::definition-file ${user} ${ruby}":
      command => "wget ${source} -O ${destination}",
      creates => $destination,
      user    => $user,
      require => Exec["rbenv::plugin::checkout ${user} ruby-build"],
    }
  }
}

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
bebox-0.0.1 lib/templates/puppet/step-0/modules/rbenv/manifests/definition.pp
freighthop-0.6.1 modules/rbenv/manifests/definition.pp
freighthop-0.6.0 modules/rbenv/manifests/definition.pp
freighthop-0.5.2 modules/rbenv/manifests/definition.pp
freighthop-0.5.1 modules/rbenv/manifests/definition.pp
freighthop-0.5.0 modules/rbenv/manifests/definition.pp
freighthop-0.4.1 modules/rbenv/manifests/definition.pp
freighthop-0.4.0 modules/rbenv/manifests/definition.pp
freighthop-0.3.3 modules/rbenv/manifests/definition.pp
freighthop-0.3.2 modules/rbenv/manifests/definition.pp
freighthop-0.3.1 modules/rbenv/manifests/definition.pp
freighthop-0.3.0 modules/rbenv/manifests/definition.pp