From 4e2ae270478ba36404e13779a4f0fe2d260e6355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Wed, 29 Dec 2010 15:59:15 +0200 Subject: [PATCH] Initial version of hastymail module. --- hastymail/manifests/init.pp | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 hastymail/manifests/init.pp diff --git a/hastymail/manifests/init.pp b/hastymail/manifests/init.pp new file mode 100644 index 0000000..bfd5396 --- /dev/null +++ b/hastymail/manifests/init.pp @@ -0,0 +1,48 @@ + +class hastymail { + + file { "/usr/local/src/hastymail.tar.gz": + ensure => present, + source => "puppet:///files/packages/hastymail.tar.gz", + mode => 0644, + owner => root, + group => root, + links => follow, + } + util::extract::tar { "/usr/local/share/hastymail": + strip => 1, + source => "/usr/local/src/hastymail.tar.gz", + require => File["/usr/local/src/hastymail.tar.gz"], + } + + file { "/etc/hastymail2": + ensure => directory, + mode => 0750, + owner => root, + group => "www-data", + } + file { "/etc/hastymail2/hastymail2.conf": + ensure => present, + source => [ "puppet:///private/hastymail2.conf", + "puppet:///files/mail/hastymail2.conf", ], + mode => 0640, + owner => root, + group => "www-data", + require => File["/etc/hastymail2"], + } + exec { "rm /etc/hastymail2/hastymail2.rc && php /usr/local/share/hastymail/install_scripts/install_config.php /etc/hastymail2/hastymail2.conf /etc/hastymail2/hastymail2.rc": + path => "/bin:/usr/bin:/sbin:/usr/sbin", + refreshonly => true, + require => Util::Extract::Tar["/usr/local/share/hastymail"], + subscribe => File["/etc/hastymail2/hastymail2.conf"], + before => File["/etc/hastymail2/hastymail2.rc"], + } + file { "/etc/hastymail2/hastymail2.rc": + ensure => present, + mode => 0640, + owner => root, + group => "www-data", + } + +} +