Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/81516
Change subject: prep to make the spamd user configurable, and create spool dir for OTRS spam training ...................................................................... prep to make the spamd user configurable, and create spool dir for OTRS spam training Change-Id: I4a8668afcee86fa6f87a51e8c26a3c98a9bea3f9 --- M manifests/mail.pp M manifests/role/otrs.pp R templates/spamassassin/spamassassin.default.erb 3 files changed, 23 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/81516/1 diff --git a/manifests/mail.pp b/manifests/mail.pp index ed19cee..4f767fe 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -259,6 +259,8 @@ $bayes_auto_learn = 1, $short_report_template = 'false', $otrs_rule_scores = 'false', + $spamd_user = 'spamd', + $spamd_group = 'spamd', ) { include network::constants @@ -266,7 +268,18 @@ ensure => latest; } - systemuser { "spamd": name => "spamd" } + # this seems broken, especially since /var/spamd is unused + # and spamd's homedir is created as /var/lib/spamd + if ( $spamd_user == "spamd" ) { + systemuser { "spamd": name => "spamd" } + file { "/var/spamd": + require => Systemuser[spamd], + ensure => directory, + owner => spamd, + group => spamd, + mode => 0700; + } + } File { require => Package[spamassassin], @@ -278,21 +291,13 @@ "/etc/spamassassin/local.cf": content => template("spamassassin/local.cf"); "/etc/default/spamassassin": - source => "puppet:///files/spamassassin/spamassassin.default"; + content => template("spamassassin/spamassassin.default.erb"); } service { "spamassassin": - require => [ File["/etc/default/spamassassin"], File["/etc/spamassassin/local.cf"], Package[spamassassin], Systemuser[spamd] ], - subscribe => [ File["/etc/default/spamassassin"], File["/etc/spamassassin/local.cf"] ], - ensure => running; - } - - file { "/var/spamd": - require => Systemuser[spamd], - ensure => directory, - owner => spamd, - group => spamd, - mode => 0700; + require => [ File["/etc/default/spamassassin"], File["/etc/spamassassin/local.cf"], Package[spamassassin], Systemuser[spamd] ], + subscribe => [ File["/etc/default/spamassassin"], File["/etc/spamassassin/local.cf"] ], + ensure => running; } monitor_service { "spamd": description => "spamassassin", check_command => "nrpe_check_spamd" } diff --git a/manifests/role/otrs.pp b/manifests/role/otrs.pp index 9683463..5c469c7 100644 --- a/manifests/role/otrs.pp +++ b/manifests/role/otrs.pp @@ -38,6 +38,11 @@ group => root, mode => '0444', source => 'puppet:///files/otrs/crontab.otrs'; + '/var/spool/spam': + ensure => directory, + owner => www-data, + group => www-data, + mode => '0555'; } install_certificate{ "star.wikimedia.org": } diff --git a/files/spamassassin/spamassassin.default b/templates/spamassassin/spamassassin.default.erb similarity index 100% rename from files/spamassassin/spamassassin.default rename to templates/spamassassin/spamassassin.default.erb -- To view, visit https://gerrit.wikimedia.org/r/81516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a8668afcee86fa6f87a51e8c26a3c98a9bea3f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen <jgr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits