summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2013-07-25 14:40:53 -0400
committerMicah Anderson <micah@leap.se>2013-07-25 15:15:55 -0400
commitd8a066a4307bea4c6dd6741daa250b67c92c1606 (patch)
tree5e8ca9e28ee66e717af83131ddd79f885b12926c /puppet
parent8a17f5ccb00eeccdce2c41370d4b49ded50aba2b (diff)
initial leap_mx configuration
Change-Id: Iddca4cf52706bf2f612d20ba19a53fbbe6b28479
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/leap_mx/manifests/init.pp56
-rw-r--r--puppet/modules/leap_mx/templates/mx.conf.erb15
-rw-r--r--puppet/modules/site_mx/manifests/init.pp1
3 files changed, 72 insertions, 0 deletions
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp
new file mode 100644
index 00000000..652eb85b
--- /dev/null
+++ b/puppet/modules/leap_mx/manifests/init.pp
@@ -0,0 +1,56 @@
+class leap_mx {
+
+ $couchdb_host = 'localhost'
+ $couchdb_port = '4096'
+ $couchdb_user = $soledad::couchdb::user
+ $couchdb_password = $soledad::couchdb::password
+
+ #
+ # USER AND GROUP
+ #
+
+ group { 'leap-mx':
+ ensure => present,
+ allowdupe => false;
+ }
+
+ user { 'leap-mx':
+ ensure => present,
+ allowdupe => false,
+ gid => 'leap-mx',
+ home => '/etc/leap',
+ require => Group['leap-mx'];
+ }
+
+ #
+ # LEAP-MX CONFIG
+ #
+
+ file { '/etc/leap/mx.conf':
+ content => template('leap_mx/mx.conf.erb'),
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0600',
+ notify => Service['leap-mx'];
+ }
+
+ #
+ # LEAP-MX CODE
+ #
+
+ package { 'leap-mx':
+ ensure => installed;
+ }
+
+ #
+ # LEAP-MX DAEMON
+ #
+
+ service { 'leap_mx':
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ hasrestart => true,
+ require => [ Package['leap-mx'] ];
+ }
+}
diff --git a/puppet/modules/leap_mx/templates/mx.conf.erb b/puppet/modules/leap_mx/templates/mx.conf.erb
new file mode 100644
index 00000000..bf1e6421
--- /dev/null
+++ b/puppet/modules/leap_mx/templates/mx.conf.erb
@@ -0,0 +1,15 @@
+[mail1]
+path=/var/mail/vmail
+recursive=True
+
+[couchdb]
+user=<%= @couchdb_user %>
+password=<%= @couchdb_password %>
+server=<%= @couchdb_host %>
+port=<%= @couchdb_port %>
+
+[alias map]
+port=4242
+
+[check recipient]
+port=2244 \ No newline at end of file
diff --git a/puppet/modules/site_mx/manifests/init.pp b/puppet/modules/site_mx/manifests/init.pp
index 86ae56e1..4cf3f41a 100644
--- a/puppet/modules/site_mx/manifests/init.pp
+++ b/puppet/modules/site_mx/manifests/init.pp
@@ -6,4 +6,5 @@ class site_mx {
include site_shorewall::mx
include site_shorewall::service::smtp
include site_mx::couchdb
+ include leap_mx
}