From 21d0fb04331cc17561e3a6ab49954470c9236a2c Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 15 Mar 2009 16:31:32 +0000 Subject: [PATCH] Test of templating Signed-off-by: Stephen Gran --- manifests/site.pp | 3 +++ modules/exim/manifests/init.pp | 8 ++++++++ templates/exim-test.erb | 28 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 templates/exim-test.erb diff --git a/manifests/site.pp b/manifests/site.pp index 638b2be0..23bcb1b5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -25,3 +25,6 @@ node default { } } +node master.debian.org inherits default { + include exim-extended +} diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 815ff167..1686b047 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -89,3 +89,11 @@ class exim { } } +class exim-extended inherits exim { + file { + "/etc/exim4/test": + require => Package["exim4-daemon-heavy"], + content => template("exim-test.erb") + ; + } +} diff --git a/templates/exim-test.erb b/templates/exim-test.erb new file mode 100644 index 00000000..9bf8cb61 --- /dev/null +++ b/templates/exim-test.erb @@ -0,0 +1,28 @@ +<% if has_variable?("clamd") && clamd == "$true" %> +CLAMAV = clamd:/var/run/clamav/clamd.ctl +<% else %> +# CLAMAV is undefined +<% end %> +<% if has_variable?("postgrey") && postgrey == "true" %> +USE_GREYLISTING = 1 +# HAVE_GREYLIST is undefined +HAVE_POSTGREY = 1 +<% else if has_variable?("greylistd") && greylistd == "true" %> +USE_GREYLISTING = 1 +HAVE_GREYLIST = 1 +# HAVE_POSTGREY is undefined +<% else %> +# HAVE_POSTGREY is undefined +# HAVE_GREYLIST is undefined +# USE_GREYLISTING is undefined +<% end %> +<% if has_variable?("bugs_host") && bugs_host == "true" %> +HAS_USER_DEBBUGS = 1 +<% else %> +# HAS_USER_DEBBUGS is undefind +<% end %> +<% if has_variable?("qa_host") && qa_host == "true" %> +HAS_USER_QA = 1 +<% else %> +# HAS_USER_QA is undefined +<% end %> -- 2.39.2