Skip to content

Commit

Permalink
Add flags to omit curl package management.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhs-rec committed Aug 27, 2024
1 parent 22b1bf9 commit c5f90a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Optional[String[1]] $no_proxy = undef,
Array[Hash[String[1], String[1]]] $signing_keys = $rvm::params::signing_keys,
Boolean $include_gnupg = true,
Boolean $manage_curl = true,
Boolean $manage_wget = true,
) inherits rvm::params {
if $install_rvm {
Expand All @@ -33,6 +34,7 @@
signing_keys => $signing_keys,
install_from => $install_from,
include_gnupg => $include_gnupg,
manage_curl => $manage_curl,
manage_wget => $manage_wget,
}
}
Expand Down
11 changes: 9 additions & 2 deletions manifests/system.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Stdlib::Absolutepath $home = $facts['root_home'],
Array[Hash[String[1], String[1]]] $signing_keys = $rvm::params::signing_keys,
Boolean $include_gnupg = true,
Boolean $manage_curl = true,
Boolean $manage_wget = true,
) inherits rvm::params {
$actual_version = $version ? {
Expand Down Expand Up @@ -67,14 +68,20 @@
}
}
else {
stdlib::ensure_packages(['curl'])
$inst_dep = if $manage_curl {
stdlib::ensure_packages(['curl'])
Package['curl']
}
else {
undef
}

exec { 'system-rvm':
path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin',
command => "curl -fsSL https://get.rvm.io | bash -s -- --version ${actual_version}",
creates => '/usr/local/rvm/bin/rvm',
environment => $environment,
require => Package['curl'],
require => $inst_dep,
}
}

Expand Down

0 comments on commit c5f90a1

Please sign in to comment.