diff options
| author | Dan Fandrich <danf@mageia.org> | 2024-10-15 14:21:45 -0700 |
|---|---|---|
| committer | Dan Fandrich <danf@mageia.org> | 2024-10-15 14:24:41 -0700 |
| commit | 0e517856b8db239fc2ae29ff4d5f007b5d1d0441 (patch) | |
| tree | 828dc0c7c146e7aad71376eee9069f21ae2c3a15 /modules/xymon | |
| parent | a8116343fd31737660b56357f4179f7cf2584255 (diff) | |
| download | puppet-0e517856b8db239fc2ae29ff4d5f007b5d1d0441.tar puppet-0e517856b8db239fc2ae29ff4d5f007b5d1d0441.tar.gz puppet-0e517856b8db239fc2ae29ff4d5f007b5d1d0441.tar.bz2 puppet-0e517856b8db239fc2ae29ff4d5f007b5d1d0441.tar.xz puppet-0e517856b8db239fc2ae29ff4d5f007b5d1d0441.zip | |
Remove conditionals for releases older than Mageia 6
This eliminates a bunch of conditionals, simplifying the configuration.
We no longer have any servers running on a release older than this.
Diffstat (limited to 'modules/xymon')
| -rw-r--r-- | modules/xymon/manifests/client.pp | 6 | ||||
| -rw-r--r-- | modules/xymon/manifests/server.pp | 28 | ||||
| -rw-r--r-- | modules/xymon/templates/xymon-client | 5 |
3 files changed, 6 insertions, 33 deletions
diff --git a/modules/xymon/manifests/client.pp b/modules/xymon/manifests/client.pp index c7883841..cfde8134 100644 --- a/modules/xymon/manifests/client.pp +++ b/modules/xymon/manifests/client.pp @@ -1,11 +1,7 @@ class xymon::client { package { 'xymon-client': } - if versioncmp($::lsbdistrelease, '5') < 0 { - $service = 'xymon-client' - } else { - $service = 'xymon' - } + $service = 'xymon' service { $service: hasstatus => false, diff --git a/modules/xymon/manifests/server.pp b/modules/xymon/manifests/server.pp index dff50430..b6c269cf 100644 --- a/modules/xymon/manifests/server.pp +++ b/modules/xymon/manifests/server.pp @@ -1,36 +1,18 @@ class xymon::server { package { ['xymon','fping']: } - if versioncmp($::lsbdistrelease, '5') < 0 { - service { 'xymon': - hasstatus => false, - status => "su xymon -c '${::lib_dir}/xymon/server/hobbit.sh status'", - require => Package['xymon'], - } - } - File { group => 'xymon', require => Package['xymon'], notify => Exec['service xymon reload'], } - if versioncmp($::lsbdistrelease, '5') < 0 { - file { - # Define hosts and web view layout, and lists tests to be run against - # host by e.g. network tests from xymon server - '/etc/xymon/bb-hosts': - content => template('xymon/bb-hosts'); - } - } else { - file { - # Define hosts and web view layout, and lists tests to be run against - # host by e.g. network tests from xymon server - '/etc/xymon/hosts.cfg': - content => template('xymon/bb-hosts'); - } - } file { + # Define hosts and web view layout, and lists tests to be run against + # host by e.g. network tests from xymon server + '/etc/xymon/hosts.cfg': + content => template('xymon/bb-hosts'); + # Environment variables user by hobbitd,hobbitlaunch,hobbitd_rrd,CGIs # and bbgen (which generates the static html pages) # hobbitlaunch (started by init script) may need to be restarted for diff --git a/modules/xymon/templates/xymon-client b/modules/xymon/templates/xymon-client index ae54b2f3..e846d2a5 100644 --- a/modules/xymon/templates/xymon-client +++ b/modules/xymon/templates/xymon-client @@ -9,12 +9,7 @@ # HOBBITSERVERS="192.168.1.1" # or (multiple servers) # HOBBITSERVERS="10.0.0.1 192.168.1.1" - -<% if scope.function_versioncmp([lsbdistrelease, '5']) >= 0 %> XYMONSERVERS="<%= server %>" -<% else %> -HOBBITSERVERS="<%= server %>" -<% end %> # The defaults usually suffice for the rest of this file, # but you can tweak the hostname that the client reports |
