changeset 119:95502bafeaa3 puppet-3.6

Blank some Apache configs to prevent httpd update breaking the server Previously, autoindex.conf used a setting we didn't have the module loaded for, so restarting Apache after an update caused it to error. We needed a Puppet-Apply to fix it. Now we should just prevent the package install re-creating the files each time because it thinks we need them.
author IBBoard <dev@ibboard.co.uk>
date Wed, 20 Jul 2016 20:31:22 +0100
parents f0a86e36d33f
children b00eb9434938
files modules/website/manifests/init.pp
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/website/manifests/init.pp	Tue Jul 19 20:25:44 2016 +0100
+++ b/modules/website/manifests/init.pp	Wed Jul 20 20:31:22 2016 +0100
@@ -43,6 +43,20 @@
     'expires':; 'setenvif':; 'headers':;
     'version':;
   }
+
+  # Updating the httpd package puts back some configs that we
+  # don't load the relevant modules for, so we'll try to make
+  # them blank so that RPM/Yum makes ".rpmnew" files instead
+  $unused_default_mods = [
+    "${::apache::mod_dir}/autoindex.conf",
+    "${::apache::mod_dir}/userdir.conf",
+    "${::apache::mod_dir}/welcome.conf",
+  ]
+  file { $unused_default_mods:
+    ensure => file,
+    content => '',
+  }
+
   file { $base_dir:
     ensure => directory;
   }