File: init.pp

package info (click to toggle)
puppet-module-camptocamp-augeas 1.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 352 kB
  • sloc: ruby: 462; makefile: 8
file content (29 lines) | stat: -rw-r--r-- 925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Class: augeas
#
# Install and configure Augeas
#
# Parameters:
#   ['version']      - the desired version of Augeas
#   ['ruby_package'] - the desired package name of the Ruby bindings for Augeas
#   ['ruby_version'] - the desired version of the Ruby bindings for Augeas
#   ['lens_dir']     - the lens directory to use
#   ['purge']        - whether to purge lens directories
class augeas (
  $version      = present,
  $ruby_package = $::augeas::params::ruby_pkg,
  $ruby_version = present,
  $lens_dir     = $::augeas::params::lens_dir,
  $purge        = true,
) inherits augeas::params {

  if versioncmp($::puppetversion, '4.0.0') >= 0 {
    contain 'augeas::files'
  } else {
    contain 'augeas::packages'
    contain 'augeas::files'
    Class['augeas::packages'] -> Class['augeas::files']

    Package['ruby-augeas', $augeas::params::augeas_pkgs] -> Augeas <| |> # lint:ignore:spaceship_operator_without_tag
  }

}