aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:59:46 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:59:46 -0200
commite530e301aeb77194b4aebf40c2d4380d79fb96c8 (patch)
tree62887dd79f85fcf2b63474612d7a594a6b0630f8
parent8ddd755b4e6e116493331a063376e57a536eba6d (diff)
downloadpuppet-postfix-e530e301aeb77194b4aebf40c2d4380d79fb96c8.tar.gz
puppet-postfix-e530e301aeb77194b4aebf40c2d4380d79fb96c8.tar.bz2
Check if mailx package is not already defined by other modules
-rw-r--r--manifests/init.pp14
1 files changed, 10 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 3637cdd..8ee2346 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -119,12 +119,18 @@ class postfix(
include postfix::virtual_regexp
}
- package { ['postfix', 'mailx']:
- ensure => installed
+ package { 'postfix':
+ ensure => installed,
}
- if $::operatingsystem == 'debian' {
- Package[mailx] { name => 'bsd-mailx' }
+ if !defined(Package['mailx']) {
+ package { 'mailx':
+ ensure => installed,
+ name => $::operatingsystem ? {
+ debian => 'bsd-mailx',
+ default => 'mailx',
+ },
+ }
}
service { 'postfix':