equal
deleted
inserted
replaced
|
1 # Class: augeas |
|
2 # |
|
3 # Install and configure Augeas |
|
4 # |
|
5 # Parameters: |
|
6 # ['version'] - the desired version of Augeas |
|
7 # ['ruby_package'] - the desired package name of the Ruby bindings for Augeas |
|
8 # ['ruby_version'] - the desired version of the Ruby bindings for Augeas |
|
9 # ['lens_dir'] - the lens directory to use |
|
10 # ['purge'] - whether to purge lens directories |
|
11 class augeas ( |
|
12 $version = present, |
|
13 $ruby_package = $::augeas::params::ruby_pkg, |
|
14 $ruby_version = present, |
|
15 $lens_dir = $::augeas::params::lens_dir, |
|
16 $purge = true, |
|
17 ) inherits augeas::params { |
|
18 |
|
19 if versioncmp($::puppetversion, '4.0.0') >= 0 { |
|
20 anchor { 'augeas::begin': } -> |
|
21 class {'::augeas::files': } -> |
|
22 anchor { 'augeas::end': } |
|
23 } else { |
|
24 anchor { 'augeas::begin': } -> |
|
25 class {'::augeas::packages': } -> |
|
26 class {'::augeas::files': } -> |
|
27 anchor { 'augeas::end': } |
|
28 |
|
29 # lint:ignore:spaceship_operator_without_tag |
|
30 Package['ruby-augeas', $augeas::params::augeas_pkgs] -> Augeas <| |> |
|
31 # lint:endignore |
|
32 } |
|
33 |
|
34 } |