Commit 65e6471b authored by Christopher Huhn's avatar Christopher Huhn
Browse files

Add support for domain_d configs

parent f43eb1de
......@@ -2,4 +2,6 @@ default[:cvmfs][:client][:default_local][:default_domain] = node['domain']
default[:cvmfs][:client][:default_local][:cache_base] = '/var/cache/cvmfs'
default[:cvmfs][:client][:default_local][:quota_limit] = 20000
default[:cvmfs][:client][:default_local][:max_ttl] = 30
default[:cvmfs][:client][:config_d] = Mash.new
default['cvmfs']['client']['domain_d'] = {}
default['cvmfs']['client']['config_d'] = {}
name "cernvm-fs"
maintainer "GSI, HPC Department"
maintainer 'GSI Helmholtzzentrum fuer Schwerionenforschung GmbH'
maintainer_email "hpc@gsi.de"
license "Apache 2.0"
description "Deploy and configure CernVM-FS clients and servers."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.3.0"
source_url 'https://git.gsi.de:chef/cookbooks/cernvm-fs/'
issues_url 'https://git.gsi.de:chef/cookbooks/cernvm-fs/issues'
version "0.4.0"
depends "sys", '>= 1.51.0'
depends "apache2", '< 6.0'
supports "debian", ">= 7.0"
......@@ -2,7 +2,7 @@
# Cookbook Name:: cernvm-fs
# Recipe:: client
#
# Copyright 2013-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Copyright 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Matteo Dessalvi <m.dessalvi@gsi.de>
......@@ -74,20 +74,39 @@ template '/etc/cvmfs/default.local' do
)
end
directory '/etc/cvmfs/config.d'
# Each repository needs its configuration file
unless node['cvmfs']['client']['config_d'].empty?
node['cvmfs']['client']['config_d'].each do |repo,config|
#
# Domain configs:
#
directory '/etc/cvmfs/domain.d'
node['cvmfs']['client']['domain_d'].each do |repo,config|
config['http_proxy'] = 'DIRECT' unless config.has_key? 'http_proxy'
template "/etc/cvmfs/domain.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables(config: config)
end
config['http_proxy'] = 'DIRECT' unless config.has_key? 'http_proxy'
end
#
# Repository configs
#
directory '/etc/cvmfs/config.d'
template "/etc/cvmfs/config.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables( :repo => repo, :config => config )
end
# Each repository needs its configuration file
node['cvmfs']['client']['config_d'].each do |repo,config|
config['http_proxy'] = 'DIRECT' unless config.has_key? 'http_proxy'
template "/etc/cvmfs/config.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables(config: config)
end
end
# /etc/cvmfs/config.d/<%= @repo %>.local
#
# DO NOT CHANGE THIS FILE MANUALLY!
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment