diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/base.pp | 10 | ||||
-rw-r--r-- | manifests/debian.pp | 4 | ||||
-rw-r--r-- | manifests/init.pp | 5 | ||||
-rw-r--r-- | manifests/redhat.pp | 4 |
4 files changed, 8 insertions, 15 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 37ad0e2..eb1a245 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,16 +1,6 @@ class augeas::base { $lens_dir = '/usr/share/augeas/lenses' - $version = $augeas_version ? { - '' => 'present', - default => $augeas_version - } - - $rubylib_version = $augeas_ruby_version ? { - '' => 'present', - default => $augeas_ruby_version - } - # ensure no file not managed by puppet ends up in there. file { $lens_dir: ensure => directory, diff --git a/manifests/debian.pp b/manifests/debian.pp index bc2e3eb..4f5783d 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -2,7 +2,7 @@ class augeas::debian inherits augeas::base { package { ['augeas-lenses', 'libaugeas0', 'augeas-tools']: - ensure => $augeas::base::version, + ensure => $augeas::version, before => File['/usr/share/augeas/lenses'], } @@ -12,7 +12,7 @@ class augeas::debian inherits augeas::base { } package {$augeas_ruby: - ensure => $augeas::base::rubylib_version, + ensure => $augeas::rubylib_version, } } diff --git a/manifests/init.pp b/manifests/init.pp index e82e21c..73b4fb7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,4 +1,7 @@ -class augeas { +class augeas( + $version = 'installed', + $rubylib_version = 'installed', +) { case $::operatingsystem { /RedHat|CentOS|Fedora/: { include augeas::redhat } /Debian|Ubuntu|kFreeBSD/: { include augeas::debian } diff --git a/manifests/redhat.pp b/manifests/redhat.pp index 1e95728..c165566 100644 --- a/manifests/redhat.pp +++ b/manifests/redhat.pp @@ -2,12 +2,12 @@ class augeas::redhat inherits augeas::base { package { ['augeas', 'augeas-libs']: - ensure => $augeas::base::version, + ensure => $augeas::version, before => File['/usr/share/augeas/lenses'], } package { 'ruby-augeas': - ensure => $augeas::base::rubylib_version, + ensure => $augeas::rubylib_version, } } |