summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp21
1 files changed, 14 insertions, 7 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 653925e..f927fe1 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,12 +14,19 @@ class augeas (
$purge = true,
) inherits augeas::params {
- anchor { 'augeas::begin': } ->
- class {'::augeas::packages': } ->
- class {'::augeas::files': } ->
- anchor { 'augeas::end': }
+ if versioncmp($::puppetversion, '4.0.0') >= 0 {
+ anchor { 'augeas::begin': } ->
+ class {'::augeas::files': } ->
+ anchor { 'augeas::end': }
+ } else {
+ anchor { 'augeas::begin': } ->
+ class {'::augeas::packages': } ->
+ class {'::augeas::files': } ->
+ anchor { 'augeas::end': }
+
+ # lint:ignore:spaceship_operator_without_tag
+ Package['ruby-augeas', $augeas::params::augeas_pkgs] -> Augeas <| |>
+ # lint:endignore
+ }
- # lint:ignore:spaceship_operator_without_tag
- Package['ruby-augeas', $augeas::params::augeas_pkgs] -> Augeas <| |>
- # lint:endignore
}