summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-17 19:48:32 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-17 19:48:32 -0200
commitf02b06b19f88ca10a6ee8d1e93d7128445f2501b (patch)
treeced2e18a130d9d69b7c897de6f4e8b7db821806b /manifests/base.pp
parentae70891c89c9e6f0c9a77e75dd64905a25ebc221 (diff)
parent199551906b8eca94e23c16b5619c206488cc112a (diff)
downloadpuppet-ejabberd-master.tar.gz
puppet-ejabberd-master.tar.bz2
Merge branch 'master' of git://git.puppet.immerda.ch/module-ejabberdHEADmaster
Conflicts: manifests/base.pp
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp22
1 files changed, 17 insertions, 5 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 1c805c3..b265547 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,15 +1,27 @@
+# manages the basic stuff for the service
class ejabberd::base {
package{'ejabberd':
ensure => installed,
}
file{'/etc/ejabberd/ejabberd.cfg':
- source => [ "puppet:///modules/site-ejabberd/${fqdn}/ejabberd.cfg",
- "puppet:///modules/site-ejabberd/ejabberd.cfg",
- "puppet:///modules/ejabberd/ejabberd.cfg" ],
require => Package['ejabberd'],
- notify => Service['ejabberd'],
- owner => root, group => ejabberd, mode => 0640;
+ notify => Service['ejabberd'],
+ owner => 'root',
+ group => 'ejabberd',
+ mode => '0640';
+ }
+
+ if $ejabberd::config_content {
+ File['/etc/ejabberd/ejabberd.cfg']{
+ content => $ejabberd::config_content
+ }
+ } else {
+ File['/etc/ejabberd/ejabberd.cfg']{
+ source => [ "puppet:///modules/site_ejabberd/${::fqdn}/ejabberd.cfg",
+ 'puppet:///modules/site_ejabberd/ejabberd.cfg',
+ 'puppet:///modules/ejabberd/ejabberd.cfg' ]
+ }
}
service{'ejabberd':