28
|
1 |
# Class: augeas::params |
|
2 |
# |
|
3 |
# Default parameters for the Augeas module |
|
4 |
# |
|
5 |
class augeas::params { |
|
6 |
|
|
7 |
if versioncmp($::puppetversion, '4.0.0') >= 0 { |
|
8 |
$lens_dir = '/opt/puppetlabs/puppet/share/augeas/lenses' |
|
9 |
} elsif (defined('$is_pe') and str2bool("${::is_pe}")) { # lint:ignore:only_variable_string |
|
10 |
# puppet enterpise has a different lens location |
|
11 |
$lens_dir = '/opt/puppet/share/augeas/lenses' |
|
12 |
} else { |
|
13 |
$lens_dir = '/usr/share/augeas/lenses' |
|
14 |
} |
|
15 |
|
|
16 |
case $::osfamily { |
|
17 |
'RedHat': { |
|
18 |
$ruby_pkg = $::operatingsystem ? { |
|
19 |
# Amazon Linux AMI (2014.09 and 2015.03) uses ruby 2.0 |
|
20 |
'Amazon' => 'ruby20-augeas', |
|
21 |
default => 'ruby-augeas' |
|
22 |
} |
|
23 |
$augeas_pkgs = ['augeas', 'augeas-libs'] |
|
24 |
} |
|
25 |
|
|
26 |
'Suse': { |
|
27 |
# RPM Sources: https://build.opensuse.org/project/show/systemsmanagement:puppet |
|
28 |
if versioncmp($::rubyversion, '2.1.2') >= 0 { |
|
29 |
# SLES 12 / openSUSE |
|
30 |
$ruby_pkg = 'ruby2.1-rubygem-ruby-augeas' |
|
31 |
} else { |
|
32 |
# SLES 11 SP3 |
|
33 |
$ruby_pkg = 'ruby1.8-rubygem-ruby-augeas' |
|
34 |
} |
|
35 |
$augeas_pkgs = ['augeas', 'augeas-lenses', 'libaugeas0' ] |
|
36 |
} |
|
37 |
|
|
38 |
'Debian': { |
|
39 |
if versioncmp($::rubyversion, '1.9.1') >= 0 { |
|
40 |
$ruby_pkg = 'libaugeas-ruby1.9.1' |
|
41 |
} else { |
|
42 |
$ruby_pkg = 'libaugeas-ruby1.8' |
|
43 |
} |
|
44 |
$augeas_pkgs = ['augeas-lenses', 'libaugeas0', 'augeas-tools'] |
|
45 |
} |
|
46 |
|
|
47 |
default: { fail("Unsupported OS family: ${::osfamily}") } |
|
48 |
} |
|
49 |
} |