From b0d1583ed1f2acc704fa77dfc292a2f2bc29c980 Mon Sep 17 00:00:00 2001 From: whitestar Date: Tue, 29 Sep 2015 15:57:20 +0900 Subject: [PATCH] update apt_utils::mirror for debian jessie. --- .gitignore | 3 +++ cookbooks/apt_utils/recipes/mirror.rb | 7 ++++++- .../apt_utils/templates/default/etc/apache2/conf.d/apt-mirror | 9 +++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fba382d..058a3d1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ nodes/*tmp.json roles/*tmp.rb cookbooks/dsh/files/default/rpms/*.rpm +# Dropbox +.dropbox.attr + # Berkshelf .vagrant Berksfile.lock diff --git a/cookbooks/apt_utils/recipes/mirror.rb b/cookbooks/apt_utils/recipes/mirror.rb index a6232b9..10794e7 100644 --- a/cookbooks/apt_utils/recipes/mirror.rb +++ b/cookbooks/apt_utils/recipes/mirror.rb @@ -54,7 +54,12 @@ httpd_conf_path = nil case node[:platform_family] when 'debian' mirror_list_path = '/etc/apt/mirror.list' - httpd_conf_path = "/etc/#{httpd_service}/conf.d/apt-mirror" + case node[:platform_version] + when 'jessie' + httpd_conf_path = "/etc/#{httpd_service}/conf-available/apt-mirror" + else + httpd_conf_path = "/etc/#{httpd_service}/conf.d/apt-mirror" + end when 'rhel' mirror_list_path = '/etc/apt-mirror.list' httpd_conf_path = "/etc/#{httpd_service}/conf.d/apt-mirror.conf" diff --git a/cookbooks/apt_utils/templates/default/etc/apache2/conf.d/apt-mirror b/cookbooks/apt_utils/templates/default/etc/apache2/conf.d/apt-mirror index 04158b7..74815e2 100644 --- a/cookbooks/apt_utils/templates/default/etc/apache2/conf.d/apt-mirror +++ b/cookbooks/apt_utils/templates/default/etc/apache2/conf.d/apt-mirror @@ -41,8 +41,13 @@ Alias <%= ctx_path %> <%= mirror_path %> Options Indexes SymLinksIfOwnerMatch FollowSymLinks IndexOptions NameWidth=* +SuppressDescription AllowOverride FileInfo Indexes - Order Deny,Allow - Allow from all + + Order Deny,Allow + Allow from all + + = 2.3> + Require all granted + ErrorDocument 404 default -- 2.11.0