}
if $::osfamily == 'Debian' {
+ # cloudera repo
exec { 'key-cloudera':
command => 'apt-key adv --fetch-key http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key',
path => $site_hadoop::path,
class site_hadoop inherits site_hadoop::params {
include 'site_hadoop::install'
include 'site_hadoop::config'
+ include 'site_hadoop::mail'
Class['site_hadoop::install'] ->
Class['site_hadoop::config'] ->
Class['site_hadoop']
+
+ Class['site_hadoop::mail'] ->
+ Class['site_hadoop']
}
--- /dev/null
+# == Class site_hadoop::mail
+#
+# Configure sending emails on Debian.
+#
+class site_hadoop::mail {
+ include stdlib
+
+ if $::osfamily == 'Debian' {
+ ensure_packages(['bsd-mailx'])
+
+ file { '/etc/exim4/update-exim4.conf.conf':
+ content => template('site_hadoop/update-exim4.conf.erb'),
+ require => Package['bsd-mailx'],
+ }
+ ~>
+ service { 'exim4':
+ ensure => running,
+ enable => true,
+ hasrestart => true,
+ restart => 'service exim4 reload',
+ }
+ }
+}
--- /dev/null
+# /etc/exim4/update-exim4.conf.conf
+#
+# Edit this file and /etc/mailname by hand and execute update-exim4.conf
+# yourself or use 'dpkg-reconfigure exim4-config'
+#
+# Please note that this is _not_ a dpkg-conffile and that automatic changes
+# to this file might happen. The code handling this will honor your local
+# changes, so this is usually fine, but will break local schemes that mess
+# around with multiple versions of the file.
+#
+# update-exim4.conf uses this file to determine variable values to generate
+# exim configuration macros for the configuration file.
+#
+# Most settings found in here do have corresponding questions in the
+# Debconf configuration, but not all of them.
+#
+# This is a Debian specific file
+
+dc_eximconfig_configtype='internet'
+dc_other_hostnames='<%= @fqdn -%>'
+dc_local_interfaces='127.0.0.1 ; ::1'
+dc_readhost=''
+dc_relay_domains=''
+dc_minimaldns='false'
+dc_relay_nets=''
+dc_smarthost=''
+CFILEMODE='644'
+dc_use_split_config='false'
+dc_hide_mailname=''
+dc_mailname_in_oh='true'
+dc_localdelivery='mail_spool'