diff options
author | kwadronaut <kwadronaut@leap.se> | 2018-09-27 01:19:23 +0200 |
---|---|---|
committer | kwadronaut <kwadronaut@leap.se> | 2018-09-27 01:19:23 +0200 |
commit | 0c0a8d7f621912a9d7727c16331923d216921dd1 (patch) | |
tree | 6117b7a81a066453b06893304643b8cadca286ed /manifests/params.pp | |
parent | 27e33591776f0226f78877df350d6a52995265d8 (diff) | |
parent | f0faa776b9cd8c9cfbe16651de2fce6b37df4dfb (diff) |
Merge tag '1.6.1'
Diffstat (limited to 'manifests/params.pp')
-rw-r--r-- | manifests/params.pp | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/manifests/params.pp b/manifests/params.pp index e540033..bf28630 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,28 +3,34 @@ # Default parameters for the Augeas module # class augeas::params { - $lens_dir = '/usr/share/augeas/lenses' case $::osfamily { 'RedHat': { - $ruby_pkg = 'ruby-augeas' + $ruby_pkg = $::operatingsystem ? { + # Amazon Linux AMI (2014.09 and 2015.03) uses ruby 2.0 + 'Amazon' => 'ruby20-augeas', + default => 'ruby-augeas' + } $augeas_pkgs = ['augeas', 'augeas-libs'] } 'Suse': { - # RPM Sources: https://build.opensuse.org/project/show/systemsmanagement:puppet - # SLES 11 SP3 - if versioncmp($::rubyversion, '1.8.7') >= 0 { - $ruby_pkg = 'ruby1.8-rubygem-ruby-augeas' - # SLES 12 - } else { + # RPM Sources: https://build.opensuse.org/project/show/systemsmanagement:puppet + if versioncmp($::rubyversion, '2.1.2') >= 0 { + # SLES 12 / openSUSE $ruby_pkg = 'ruby2.1-rubygem-ruby-augeas' + } else { + # SLES 11 SP3 + $ruby_pkg = 'ruby1.8-rubygem-ruby-augeas' } $augeas_pkgs = ['augeas', 'augeas-lenses', 'libaugeas0' ] } 'Debian': { - if versioncmp($::rubyversion, '1.9.1') >= 0 { + if versioncmp($::rubyversion, '2.1.0') >= 0 { + $ruby_pkg = 'ruby-augeas' + } + elsif versioncmp($::rubyversion, '1.9.1') >= 0 { $ruby_pkg = 'libaugeas-ruby1.9.1' } else { $ruby_pkg = 'libaugeas-ruby1.8' @@ -34,4 +40,14 @@ class augeas::params { default: { fail("Unsupported OS family: ${::osfamily}") } } + + if versioncmp($::puppetversion, '4.0.0') >= 0 { + $lens_dir = '/opt/puppetlabs/puppet/share/augeas/lenses' + } elsif (defined('$is_pe') and str2bool("${::is_pe}")) { # lint:ignore:only_variable_string + # puppet enterpise has a different lens location + $lens_dir = '/opt/puppet/share/augeas/lenses' + } else { + $lens_dir = '/usr/share/augeas/lenses' + } + } |