Skip to content

Commit

Permalink
Merge pull request #768 from erik-frontify/amazon_linux2_support
Browse files Browse the repository at this point in the history
Add support for Amazon Linux 2
  • Loading branch information
Helen authored Aug 9, 2018
2 parents 3cb8899 + 1a9215c commit 0b9085b
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions manifests/linux/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,30 @@
}
}

service { $service_name:
ensure => $ensure,
enable => $enable,
hasstatus => true,
}
service { $service_name_v6:
ensure => $_ensure_v6,
enable => $_enable_v6,
hasstatus => true,
if ($::operatingsystem == 'Amazon') and (versioncmp($::operatingsystemmajrelease, '4') >= 0) {
service { $service_name:
ensure => $ensure,
enable => $enable,
hasstatus => true,
provider => systemd,
}
service { $service_name_v6:
ensure => $_ensure_v6,
enable => $_enable_v6,
hasstatus => true,
provider => systemd,
}
} else {
service { $service_name:
ensure => $ensure,
enable => $enable,
hasstatus => true,
}
service { $service_name_v6:
ensure => $_ensure_v6,
enable => $_enable_v6,
hasstatus => true,
}
}

file { "/etc/sysconfig/${service_name}":
Expand Down

0 comments on commit 0b9085b

Please sign in to comment.