From 058dbb366b96cae1f8fb0def65f73a698f1c375d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Jul 2014 10:09:41 +0200 Subject: make our autoconfig setup public --- manifests/mozilla_autoconfig.pp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 manifests/mozilla_autoconfig.pp (limited to 'manifests') diff --git a/manifests/mozilla_autoconfig.pp b/manifests/mozilla_autoconfig.pp new file mode 100644 index 0000000..f16e5ec --- /dev/null +++ b/manifests/mozilla_autoconfig.pp @@ -0,0 +1,37 @@ +# setup autoconfig infos +# +# this will create a global autoconfig file, that maps +# any of your hosted domains on this host to a certain +# provider configuration. Which means, that you get a zero +# setup autoconfig for any domain that you host the website +# and the emails for. +# By default you only need to define the provider, which +# is usually your main domain. Everything else should be +# derived from that. +# You can however still fine tune things from it. +class apache::mozilla_autoconfig( + $provider, + $display_name = undef, + $shortname = undef, + $imap_server = undef, + $pop_server = undef, + $smtp_server = undef, + $documentation_url = undef, +) { + apache::config::global { 'mozilla_autoconfig.conf': } + + file{ + '/var/www/autoconfig': + ensure => directory, + require => Package['apache'], + owner => root, + group => apache, + mode => '0640'; + '/var/www/autoconfig/config.shtml': + content => template('apache/webfiles/autoconfig/config.shtml.erb'), + owner => root, + group => apache, + mode => '0640', + before => Service['apache'], + } +} -- cgit v1.2.3