diff --git a/manifests/init.pp b/manifests/init.pp index a63caea..04937e2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 { @@ -33,6 +34,7 @@ signing_keys => $signing_keys, install_from => $install_from, include_gnupg => $include_gnupg, + manage_curl => $manage_curl, manage_wget => $manage_wget, } } diff --git a/manifests/system.pp b/manifests/system.pp index fcc9481..e1d4946 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -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 ? { @@ -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, } }