aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-10-15 14:21:45 -0700
committerDan Fandrich <danf@mageia.org>2024-10-15 14:24:41 -0700
commit0e517856b8db239fc2ae29ff4d5f007b5d1d0441 (patch)
tree828dc0c7c146e7aad71376eee9069f21ae2c3a15 /modules
parenta8116343fd31737660b56357f4179f7cf2584255 (diff)
downloadpuppet-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')
-rw-r--r--modules/amavis/templates/amavisd.conf5
-rw-r--r--modules/apache/manifests/base.pp17
-rw-r--r--modules/apache/manifests/var.pp6
-rw-r--r--modules/apache/templates/50_mod_deflate.conf2
-rw-r--r--modules/bind/templates/named_base.conf39
-rw-r--r--modules/openldap/manifests/var.pp6
-rw-r--r--modules/openssh/templates/sshd_config15
-rw-r--r--modules/pam/manifests/base.pp6
-rw-r--r--modules/postgresql/manifests/var.pp8
-rw-r--r--modules/puppet/manifests/hiera.pp13
-rw-r--r--modules/xymon/manifests/client.pp6
-rw-r--r--modules/xymon/manifests/server.pp28
-rw-r--r--modules/xymon/templates/xymon-client5
13 files changed, 14 insertions, 142 deletions
diff --git a/modules/amavis/templates/amavisd.conf b/modules/amavis/templates/amavisd.conf
index e00bc511..84a44944 100644
--- a/modules/amavis/templates/amavisd.conf
+++ b/modules/amavis/templates/amavisd.conf
@@ -22,10 +22,7 @@ $daemon_group = 'amavis'; # (no default; customary: vscan or amavis), -g
# a convenient default for other settings could be localhost.localdomain
# or change this as your needs
-<% if scope.function_versioncmp([lsbdistrelease, '6']) >= 0 -%>
-$MYHOME = '/run/amavis';
-<% end %>
-# $MYHOME = '/var/lib/amavis'; # a convenient default for other settings, -H
+$MYHOME = '/run/amavis'; # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = '/var/spool/amavis/virusmails'; # -Q
diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp
index 9190867a..4e1d6ed4 100644
--- a/modules/apache/manifests/base.pp
+++ b/modules/apache/manifests/base.pp
@@ -1,25 +1,12 @@
class apache::base {
include apache::var
- # apache-mpm-prefork is merged from mga3 up
- $apache_server = $lsbdistrelease ? {
- /1|2/ => 'apache-mpm-prefork',
- default => 'apache',
- }
+ $conf_d = '/etc/httpd/conf/conf.d'
- package { $apache_server:
+ package { 'apache':
alias => 'apache-server',
}
- if versioncmp($::lsbdistrelease, '2') <= 0 {
- $conf_d = '/etc/httpd/conf.d'
-
- # only needed on mga1 and mga2
- package { $apache::var::pkg_conf: }
- } else {
- $conf_d = '/etc/httpd/conf/conf.d'
- }
-
service { 'httpd':
alias => 'apache',
subscribe => [ Package['apache-server'] ],
diff --git a/modules/apache/manifests/var.pp b/modules/apache/manifests/var.pp
index 2c33a23f..4a6d68eb 100644
--- a/modules/apache/manifests/var.pp
+++ b/modules/apache/manifests/var.pp
@@ -8,9 +8,5 @@ class apache::var(
$apache_group = 'apache',
$default_vhost_redirect = ''
) {
- if ($::lsbdistrelease == '1') or ($::lsbdistid == 'MandrivaLinux') {
- $pkg_conf = 'apache-conf'
- } else {
- $pkg_conf = 'apache'
- }
+ $pkg_conf = 'apache'
}
diff --git a/modules/apache/templates/50_mod_deflate.conf b/modules/apache/templates/50_mod_deflate.conf
index 09edf006..5192bf6e 100644
--- a/modules/apache/templates/50_mod_deflate.conf
+++ b/modules/apache/templates/50_mod_deflate.conf
@@ -1,5 +1,5 @@
<IfModule mod_deflate.c>
- # Compress HTML, CSS, JavaScript, Text, XML and fonts
+ # Compress HTML, CSS, JavaScript, JSON, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/rss+xml
diff --git a/modules/bind/templates/named_base.conf b/modules/bind/templates/named_base.conf
index 941cf196..5adba9f3 100644
--- a/modules/bind/templates/named_base.conf
+++ b/modules/bind/templates/named_base.conf
@@ -32,9 +32,6 @@ options {
version "";
directory "/var/named";
dump-file "/var/tmp/named_dump.db";
-<% if scope.function_versioncmp([lsbdistrelease, '3']) < 0 -%>
- pid-file "/var/run/named.pid";
-<% end -%>
statistics-file "/var/tmp/named.stats";
zone-statistics yes;
// datasize 256M;
@@ -103,67 +100,31 @@ zone "." IN {
zone "localdomain" IN {
type master;
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
file "named.localhost";
-<% else -%>
- file "master/localdomain.zone";
-<% end -%>
allow-update { none; };
};
zone "localhost" IN {
type master;
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
file "named.localhost";
-<% else -%>
- file "master/localhost.zone";
-<% end -%>
allow-update { none; };
};
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
zone "1.0.0.127.in-addr.arpa" IN {
-<% else -%>
-zone "0.0.127.in-addr.arpa" IN {
-<% end -%>
type master;
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
file "named.loopback";
-<% else -%>
- file "reverse/named.local";
-<% end -%>
allow-update { none; };
};
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
-<% else -%>
-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
-<% end -%>
type master;
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
file "named.loopback";
-<% else -%>
- file "reverse/named.ip6.local";
-<% end -%>
allow-update { none; };
};
-<% if scope.function_versioncmp([lsbdistrelease, '3']) < 0 -%>
-zone "255.in-addr.arpa" IN {
- type master;
- file "reverse/named.broadcast";
- allow-update { none; };
-};
-
-<% end -%>
zone "0.in-addr.arpa" IN {
type master;
-<% if scope.function_versioncmp([lsbdistrelease, '3']) >= 0 -%>
file "named.empty";
-<% else -%>
- file "reverse/named.zero";
-<% end -%>
allow-update { none; };
};
diff --git a/modules/openldap/manifests/var.pp b/modules/openldap/manifests/var.pp
index 772ac22b..d6947eb8 100644
--- a/modules/openldap/manifests/var.pp
+++ b/modules/openldap/manifests/var.pp
@@ -1,7 +1,3 @@
class openldap::var {
- if versioncmp($::lsbdistrelease, '4') < 0 {
- $service = 'ldap'
- } else {
- $service = 'slapd'
- }
+ $service = 'slapd'
}
diff --git a/modules/openssh/templates/sshd_config b/modules/openssh/templates/sshd_config
index 43c3f9c5..56ddd725 100644
--- a/modules/openssh/templates/sshd_config
+++ b/modules/openssh/templates/sshd_config
@@ -18,18 +18,10 @@
# The default requires explicit activation of protocol 1
#Protocol 2
-<% if scope.function_versioncmp([lsbdistrelease, '6']) < 0 -%>
-# HostKey for protocol version 1
-HostKey /etc/ssh/ssh_host_key
-<% end %>
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
-<% if scope.function_versioncmp([lsbdistrelease, '6']) < 0 -%>
-HostKey /etc/ssh/ssh_host_dsa_key
-<% else %>
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
-<% end %>
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
@@ -106,9 +98,6 @@ X11Forwarding yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
-<% if scope.function_versioncmp([lsbdistrelease, '6']) < 0 -%>
-UsePrivilegeSeparation yes
-<% end %>
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
@@ -123,11 +112,7 @@ UsePrivilegeSeparation yes
#Banner none
# override default of no subsystems
-<% if scope.function_versioncmp([lsbdistrelease, '6']) < 0 -%>
-Subsystem sftp <%= path_to_sftp %>/sftp-server
-<% else %>
Subsystem sftp /usr/libexec/openssh/sftp-server
-<% end %>
# Example of overriding settings on a per-user basis
#Match User anoncvs
diff --git a/modules/pam/manifests/base.pp b/modules/pam/manifests/base.pp
index cfeff23d..20a4d336 100644
--- a/modules/pam/manifests/base.pp
+++ b/modules/pam/manifests/base.pp
@@ -2,11 +2,7 @@ class pam::base {
include pam::multiple_ldap_access
package { ['nscd']: }
- if versioncmp($::lsbdistrelease, '2') < 0 {
- package { ['pam_ldap','nss_ldap']: }
- } else {
- package { ['nss-pam-ldapd']: }
- }
+ package { ['nss-pam-ldapd']: }
service { 'nscd':
require => Package['nscd'],
diff --git a/modules/postgresql/manifests/var.pp b/modules/postgresql/manifests/var.pp
index bda15cf6..b31c7ffe 100644
--- a/modules/postgresql/manifests/var.pp
+++ b/modules/postgresql/manifests/var.pp
@@ -1,13 +1,7 @@
class postgresql::var {
$pgsql_data = '/var/lib/pgsql/data/'
-
- if versioncmp($::lsbdistrelease, '5') < 0 {
- $pg_version = '9.0'
- } else {
- $pg_version = '9.6'
- }
-
+ $pg_version = '9.6'
$hba_file = "${pgsql_data}/pg_hba.conf"
}
# vim: sw=2
diff --git a/modules/puppet/manifests/hiera.pp b/modules/puppet/manifests/hiera.pp
index 338b67e1..02900cd7 100644
--- a/modules/puppet/manifests/hiera.pp
+++ b/modules/puppet/manifests/hiera.pp
@@ -1,19 +1,6 @@
class puppet::hiera {
package { ['ruby-hiera']: }
- if versioncmp($::lsbdistrelease, '4') < 0 {
- package { ['ruby-hiera-puppet']: }
- # ugly hack for puppet 2.7, since hiera has been integrated
- # from puppet 3 only (Mageia 4)
- file { '/etc/puppet/external/hiera':
- ensure => link,
- # this should be /usr/share/ruby/gems/gems/hiera-puppet-1.0.0
- # on Mageia 3, but we do not have any infra hosts running mga3
- target => '/usr/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0/',
- require => Package['ruby-hiera-puppet'],
- }
- }
-
# ease the use fo the command line tool
# who use a different location for the config file
file { '/etc/hiera.yaml':
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