diff options
author | Tom De Vylder <tom@penumbra.be> | 2012-11-27 15:09:14 +0100 |
---|---|---|
committer | Tom De Vylder <tom@penumbra.be> | 2012-11-27 16:26:02 +0100 |
commit | 1bb42e761914c0e6dc3cb7902634caf4ab35b90f (patch) | |
tree | 5443301f23cf8ff69b1394cfc92eb9ce0cd84926 /manifests | |
parent | d6aa7d5516d5d29ee4864d35359f9f64ddb9b84f (diff) | |
download | puppet-nfs-1bb42e761914c0e6dc3cb7902634caf4ab35b90f.tar.gz puppet-nfs-1bb42e761914c0e6dc3cb7902634caf4ab35b90f.tar.bz2 |
OS-specific package behaviour
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/install.pp | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/manifests/install.pp b/manifests/install.pp index 7f1fef9..c7665ba 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,20 +1,38 @@ # = Class nfs::install # class nfs::install { - if $::nfs::client { - @package { $::nfs::pkg_list_client: - ensure => $::nfs::pkg_ensure; + + case $::osfamily { + 'RedHat': { + # Both client and server are installed using + # a single package on RHEL + + if $::nfs::client or $::nfs::server { + package { $::nfs::pkg_list_client: + ensure => $::nfs::pkg_ensure; + } + } } - realize(Package[$::nfs::pkg_list_client]) - } + 'Debian': { + # On Debian client and server packages are split. - if $::nfs::server { - @package { $::nfs::pkg_list_server: - ensure => $::nfs::pkg_ensure; + if $::nfs::client { + package { $::nfs::pkg_list_client: + ensure => $::nfs::pkg_ensure; + } + } + + if $::nfs::server { + package { $::nfs::pkg_list_server: + ensure => $::nfs::pkg_ensure; + } + } } - realize(Package[$::nfs::pkg_list_server]) + default: { + fail "Operating system ${::operatingsystem} is not supported yet." + } } } |