diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-17 19:48:32 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-17 19:48:32 -0200 |
commit | f02b06b19f88ca10a6ee8d1e93d7128445f2501b (patch) | |
tree | ced2e18a130d9d69b7c897de6f4e8b7db821806b /manifests/base.pp | |
parent | ae70891c89c9e6f0c9a77e75dd64905a25ebc221 (diff) | |
parent | 199551906b8eca94e23c16b5619c206488cc112a (diff) | |
download | puppet-ejabberd-master.tar.gz puppet-ejabberd-master.tar.bz2 |
Conflicts:
manifests/base.pp
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 22 |
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': |