From b7cd43093d3cda9cb8b02827b7efcbf7ada26695 Mon Sep 17 00:00:00 2001 From: Alex Simenduev Date: Thu, 4 Jun 2015 23:18:16 +0300 Subject: Add support for Amazon Linux AMI --- manifests/params.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index e540033..6d4017e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -7,7 +7,11 @@ class augeas::params { 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'] } -- cgit v1.2.3 From 18a4c4a10b230e224f4b643c30e07811d3e0c22e Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Sun, 14 Jun 2015 14:24:15 +0200 Subject: fix the ruby-augeas gem installation on SLES and openSUSE the current logic is broken, it pulls in the opposite package than what it should --- manifests/params.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index e540033..59023ab 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,13 +12,13 @@ class augeas::params { } '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' ] } -- cgit v1.2.3 From c401a47f78972143814bceba05f7aa615cfaf9b7 Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Tue, 21 Apr 2015 17:47:39 +0200 Subject: Initial support for Puppet 4 AIO package version --- manifests/params.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index 59023ab..4ca216d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,7 +3,12 @@ # Default parameters for the Augeas module # class augeas::params { - $lens_dir = '/usr/share/augeas/lenses' + + if versioncmp($::puppetversion, '4.0.0') >= 0 { + $lens_dir = '/opt/puppetlabs/puppet/share/augeas/lenses' + } else { + $lens_dir = '/usr/share/augeas/lenses' + } case $::osfamily { 'RedHat': { -- cgit v1.2.3 From 597a2fce2f85d4ea509cddf7d59858b13446e233 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 9 Jul 2015 16:27:05 -0500 Subject: Update lens location for Puppet Enterprise The lens location for Puppet Enterprise differs from the standard location for the opensource version. We can detect if we are running the enterprise version. This commit should resolve #52. --- manifests/params.pp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index 3d0b0f5..cce558d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,6 +6,9 @@ class augeas::params { if versioncmp($::puppetversion, '4.0.0') >= 0 { $lens_dir = '/opt/puppetlabs/puppet/share/augeas/lenses' + } elsif (str2bool($::is_pe)) { + # puppet enterpise has a different lens location + $lens_dir = '/opt/puppet/share/augeas/lenses' } else { $lens_dir = '/usr/share/augeas/lenses' } -- cgit v1.2.3 From d918035d3abb026c334e090fb8ac29974e0f12d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 31 Aug 2015 16:19:02 +0200 Subject: is_pe is not defined in Puppet open-source --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index cce558d..dc64f9c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,7 +6,7 @@ class augeas::params { if versioncmp($::puppetversion, '4.0.0') >= 0 { $lens_dir = '/opt/puppetlabs/puppet/share/augeas/lenses' - } elsif (str2bool($::is_pe)) { + } 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 { -- cgit v1.2.3 From e3704016003bac7c775b15c2b936b47f2a7b79a0 Mon Sep 17 00:00:00 2001 From: jostmart Date: Mon, 25 Apr 2016 12:21:27 +0200 Subject: ruby-augeas instead of libaugeas-ruby root@x220:~# ruby --version ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] root@x220:~# dpkg -l | grep ruby-augeas ii ruby-augeas 1:0.5.0-3build1 amd64 Augeas bindings for the Ruby language root@x220:~# dpkg -l | grep libaugeas-ruby $ ruby --version ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] $ dpkg -l | grep ruby-augeas ii libaugeas-ruby 0.5.0-2 all Transitional package for ruby-augeas ii libaugeas-ruby1.9.1 0.5.0-2 all Transitional package for ruby-augeas ii ruby-augeas 0.5.0-2 amd64 Augeas bindings for the Ruby language --- manifests/params.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index dc64f9c..0ae3feb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -36,7 +36,10 @@ class augeas::params { } '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' -- cgit v1.2.3 From 7e86bedd8489eb47ea3e52b126bd20828d705eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Fri, 27 May 2016 09:04:08 +0200 Subject: Check for valid OS first --- manifests/params.pp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'manifests/params.pp') diff --git a/manifests/params.pp b/manifests/params.pp index 0ae3feb..bf28630 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,15 +4,6 @@ # class augeas::params { - 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' - } - case $::osfamily { 'RedHat': { $ruby_pkg = $::operatingsystem ? { @@ -49,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' + } + } -- cgit v1.2.3