summaryrefslogtreecommitdiff
path: root/puppet/modules/leap_mx/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/leap_mx/manifests')
-rw-r--r--puppet/modules/leap_mx/manifests/init.pp34
1 files changed, 30 insertions, 4 deletions
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp
index c90fc231..6bcdd19a 100644
--- a/puppet/modules/leap_mx/manifests/init.pp
+++ b/puppet/modules/leap_mx/manifests/init.pp
@@ -7,6 +7,8 @@ class leap_mx {
$couchdb_host = 'localhost'
$couchdb_port = '4096'
+ $sources = hiera('sources')
+
include soledad::common
include site_apt::preferences::twisted
@@ -39,16 +41,26 @@ class leap_mx {
notify => Service['leap-mx'];
}
+ file { '/etc/default/leap_mx':
+ content => 'LOGFILE=/var/log/leap/mx.log',
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ notify => Service['leap-mx'];
+ }
+
#
# LEAP-MX CODE AND DEPENDENCIES
#
package {
- 'leap-mx':
- ensure => latest,
- require => Class['site_apt::preferences::twisted'];
+ $sources['leap-mx']['package']:
+ ensure => $sources['leap-mx']['revision'],
+ require => [
+ Class['site_apt::preferences::twisted'],
+ Class['site_apt::leap_repo'] ];
- [ 'leap-keymanager' ]:
+ 'leap-keymanager':
ensure => latest;
}
@@ -63,4 +75,18 @@ class leap_mx {
hasrestart => true,
require => [ Package['leap-mx'] ];
}
+
+ augeas {
+ "logrotate_mx":
+ context => "/files/etc/logrotate.d/leap-mx/rule",
+ changes => [
+ "set file /var/log/leap/mx.log",
+ 'set rotate 5',
+ 'set schedule daily',
+ 'set compress compress',
+ 'set missingok missingok',
+ 'set ifempty notifempty',
+ 'set copytruncate copytruncate'
+ ]
+ }
}