summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--puppet/modules/leap_mx/manifests/init.pp39
-rw-r--r--puppet/modules/site_config/manifests/packages/base.pp12
-rw-r--r--puppet/modules/site_config/manifests/remove/files.pp10
-rw-r--r--puppet/modules/site_config/manifests/setup.pp8
-rw-r--r--puppet/modules/site_config/manifests/slow.pp7
5 files changed, 53 insertions, 23 deletions
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp
index 055a57ef..50bc8a18 100644
--- a/puppet/modules/leap_mx/manifests/init.pp
+++ b/puppet/modules/leap_mx/manifests/init.pp
@@ -40,12 +40,37 @@ class leap_mx {
require => Group['leap-mx'];
}
- file { '/var/mail/leap-mx':
- ensure => directory,
- owner => 'leap-mx',
- group => 'leap-mx',
- mode => '0755',
- require => User['leap-mx'],
+ file {
+ '/var/mail/leap-mx':
+ ensure => directory,
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0755',
+ require => User['leap-mx'];
+
+ '/var/mail/leap-mx/Maildir':
+ ensure => directory,
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0700';
+
+ '/var/mail/leap-mx/Maildir/new':
+ ensure => directory,
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0700';
+
+ '/var/mail/leap-mx/Maildir/cur':
+ ensure => directory,
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0700';
+
+ '/var/mail/leap-mx/Maildir/tmp':
+ ensure => directory,
+ owner => 'leap-mx',
+ group => 'leap-mx',
+ mode => '0700';
}
#
@@ -60,7 +85,7 @@ class leap_mx {
notify => Service['leap-mx'];
}
- leap::logfile { 'mx': }
+ leap::logfile { 'mx': process => 'leap-mx' }
#
# LEAP-MX CODE AND DEPENDENCIES
diff --git a/puppet/modules/site_config/manifests/packages/base.pp b/puppet/modules/site_config/manifests/packages/base.pp
index c23495fc..b53a9364 100644
--- a/puppet/modules/site_config/manifests/packages/base.pp
+++ b/puppet/modules/site_config/manifests/packages/base.pp
@@ -8,12 +8,18 @@ class site_config::packages::base {
}
# base set of packages that we want to remove everywhere
- package { [ 'acpi', 'eject', 'ftp',
- 'laptop-detect', 'lpr', 'nfs-common', 'nfs-kernel-server',
- 'portmap', 'pppconfig', 'pppoe', 'pump', 'qstat', 'rpcbind',
+ package { [ 'acpi', 'eject', 'ftp', 'laptop-detect', 'lpr',
+ 'portmap', 'pppconfig', 'pppoe', 'pump', 'qstat',
'samba-common', 'samba-common-bin', 'smbclient', 'tcl8.5',
'tk8.5', 'os-prober', 'unzip', 'xauth', 'x11-common',
'x11-utils', 'xterm' ]:
ensure => absent;
}
+
+ notice($::site_config::params::environment)
+ if $::site_config::params::environment != 'local' {
+ package { [ 'nfs-common', 'nfs-kernel-server', 'rpcbind' ]:
+ ensure => purged;
+ }
+ }
}
diff --git a/puppet/modules/site_config/manifests/remove/files.pp b/puppet/modules/site_config/manifests/remove/files.pp
index 67171259..077381e1 100644
--- a/puppet/modules/site_config/manifests/remove/files.pp
+++ b/puppet/modules/site_config/manifests/remove/files.pp
@@ -14,7 +14,7 @@ class site_config::remove::files {
# Platform 0.8 removals
tidy {
'/etc/default/leap_mx':;
- '/etc/logrotate.d/leap-mx':;
+ '/etc/logrotate.d/mx':;
}
#
@@ -23,7 +23,6 @@ class site_config::remove::files {
tidy {
'/etc/rsyslog.d/99-tapicero.conf':;
- '/etc/rsyslog.d/99-leap-mx.conf':;
'/etc/rsyslog.d/01-webapp.conf':;
'/etc/rsyslog.d/50-stunnel.conf':;
'/etc/logrotate.d/stunnel':;
@@ -32,13 +31,10 @@ class site_config::remove::files {
path => '/var/log/',
recurse => true,
matches => 'leap_mx*';
- # We rotate 5 logs, so we should only have mx.log, mx.log.[1-5], with an
- # optional .gz suffix. The following will remove any logs that are out
- # of this range
- 'leap_mx_rotate':
+ 'mx':
path => '/var/log/leap/',
recurse => true,
- matches => [ 'mx.log.[6-9](.gz)?', 'mx.log.[0-9][0-9]'];
+ matches => 'mx.log*';
'/srv/leap/webapp/public/provider.json':;
'/srv/leap/couchdb/designs/tmp_users':
recurse => true,
diff --git a/puppet/modules/site_config/manifests/setup.pp b/puppet/modules/site_config/manifests/setup.pp
index b09d0413..dba5fa14 100644
--- a/puppet/modules/site_config/manifests/setup.pp
+++ b/puppet/modules/site_config/manifests/setup.pp
@@ -1,3 +1,7 @@
+# common things to set up on every node
+# leftover from the past, where we did two puppetruns
+# after another. We should consolidate this into site_config::default
+# in the future.
class site_config::setup {
tag 'leap_base'
@@ -13,9 +17,7 @@ class site_config::setup {
include stdlib
# configure /etc/hosts
- class { 'site_config::hosts':
- stage => setup,
- }
+ class { 'site_config::hosts': }
include site_config::initial_firewall
diff --git a/puppet/modules/site_config/manifests/slow.pp b/puppet/modules/site_config/manifests/slow.pp
index 94bac88d..3650eb19 100644
--- a/puppet/modules/site_config/manifests/slow.pp
+++ b/puppet/modules/site_config/manifests/slow.pp
@@ -1,6 +1,7 @@
+# this class is run by default, but can be excluded
+# for testing purposes by calling "leap deploy" with
+# the "--fast" parameter
class site_config::slow {
tag 'leap_slow'
- class { 'site_apt::dist_upgrade':
- stage => setup,
- }
+ class { 'site_apt::dist_upgrade': }
}