summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
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':