Initial version of hastymail module.
This commit is contained in:
parent
6cb50c10e8
commit
4e2ae27047
1 changed files with 48 additions and 0 deletions
48
hastymail/manifests/init.pp
Normal file
48
hastymail/manifests/init.pp
Normal file
|
@ -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",
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue