Skip to content

Commit

Permalink
Add support for RHEL8
Browse files Browse the repository at this point in the history
  • Loading branch information
thias committed Jun 6, 2019
1 parent e43d7e7 commit 5da3b6f
Show file tree
Hide file tree
Showing 6 changed files with 1,232 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2019-06-05 - 0.3.5
* Add support for RHEL8.

#### 2016-02-02 - 0.3.4
* Expanded TLS and client-TLS directives (#28, @adamcstephens).
* Cosmetic cleanups to main.cf templates.
Expand Down
16 changes: 12 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@
case $::osfamily {
'RedHat': {
$postfix_version = $::operatingsystemmajrelease ? {
#'7' => '2.10.1',
'7' => '2.6.6', # Not correct, but let's not change existing
'6' => '2.6.6',
'5' => '2.3.3',
default => '2.6.6',
default => undef,
}
$command_directory = '/usr/sbin'
$config_directory = '/etc/postfix'
$daemon_directory = '/usr/libexec/postfix'
$shlib_directory = '/usr/lib64/postfix'
$data_directory = '/var/lib/postfix'
$manpage_directory = '/usr/share/man'
$readme_directory = "/usr/share/doc/postfix-${postfix_version}/README_FILES"
$sample_directory = "/usr/share/doc/postfix-${postfix_version}/samples"
if $postfix_version {
$readme_directory = "/usr/share/doc/postfix-${postfix_version}/README_FILES"
$sample_directory = "/usr/share/doc/postfix-${postfix_version}/samples"
} else {
$readme_directory = '/usr/share/doc/postfix/README_FILES'
$sample_directory = '/usr/share/doc/postfix/samples'
}
$service_restart = '/sbin/service postfix reload'
$dovecot_directory = '/usr/libexec/dovecot'
$postfix_package = 'postfix'
Expand All @@ -38,6 +44,7 @@
$command_directory = '/usr/sbin'
$config_directory = '/etc/postfix'
$daemon_directory = '/usr/lib/postfix'
$shlib_directory = '/usr/lib64/postfix'
$data_directory = '/var/lib/postfix'
$manpage_directory = '/usr/share/man'
$readme_directory = '/usr/share/doc/postfix'
Expand All @@ -64,6 +71,7 @@
$command_directory = '/usr/local/sbin'
$config_directory = '/usr/local/etc/postfix'
$daemon_directory = '/usr/local/libexec/postfix'
$shlib_directory = '/usr/local/lib64/postfix'
$data_directory = '/var/db/postfix'
$manpage_directory = '/usr/local/man'
$readme_directory = '/usr/local/share/doc/postfix'
Expand Down
10 changes: 8 additions & 2 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@

# Default has el5 files, for el6 a few defaults have changed
# FIXME : el6 template works for el7, but a new one would be prettier
if ( $::operatingsystem =~ /RedHat|CentOS/ and versioncmp($::operatingsystemrelease, '6') < 0 ) {
$filesuffix = '-el5'
if $::operatingsystem =~ /RedHat|CentOS/ {
if versioncmp($::operatingsystemmajrelease, '6') < 0 {
$filesuffix = '-el5'
} elsif versioncmp($::operatingsystemmajrelease, '8') >= 0 {
$filesuffix = '-el8'
} else {
$filesuffix = ''
}
} else {
$filesuffix = ''
}
Expand Down
12 changes: 4 additions & 8 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thias-postfix",
"version": "0.3.4",
"version": "0.3.5",
"author": "Matthias Saou",
"license": "Apache-2.0",
"summary": "Postfix Mail Transport Agent module",
Expand All @@ -11,11 +11,11 @@
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [ "5", "6", "7" ]
"operatingsystemrelease": [ "5", "6", "7", "8" ]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [ "5", "6", "7" ]
"operatingsystemrelease": [ "5", "6", "7", "8" ]
},
{
"operatingsystem": "Debian",
Expand All @@ -27,13 +27,9 @@
}
],
"requirements": [
{
"name": "pe",
"version_requirement": "3.x"
},
{
"name": "puppet",
"version_requirement": ">=2.7.20 <4.1.0"
"version_requirement": ">=2.7.20 <7.0.0"
}
],
"dependencies": []
Expand Down
Loading

0 comments on commit 5da3b6f

Please sign in to comment.