Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
mickenordin committed Nov 16, 2024
2 parents acd67b4 + 1953207 commit d1a5d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions manifests/xrootd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class sunet::xrootd(
Array $cms_allow_hosts,
Array $managers,
String $environment,
String $cms_port = '1213',
String $container_image = 'docker.sunet.se/staas/xrootd-s3-http',
String $container_tag = '0.17.0-1',
Expand All @@ -14,7 +13,7 @@

$hostname = $facts['networking']['fqdn']
# Config
$config = lookup($environment)
$xrootd_buckets = lookup('xrootd_buckets')

# Composefile
sunet::docker_compose { 'xrootd':
Expand All @@ -41,7 +40,7 @@
ensure => file,
content => template('sunet/xrootd/xrootd.cfg.erb'),
}
$config['buckets'].each |$bucket| {
$xrootd_buckets.each |$bucket| {
file { "/opt/xrootd/config/${bucket['name']}":
ensure => directory,
}
Expand Down
6 changes: 3 additions & 3 deletions templates/xrootd/xrootd.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ cms.allow host <%= host %>
<% end -%>

# Bucket specific s3 options
<% if @config['buckets'].is_a? Array and @config['buckets'].size > 0 -%>
<% @config['buckets'].each do |bucket| -%>
<% if @xrootd_buckets.is_a? Array and @xrootd_buckets.size > 0 -%>
<% @xrootd_buckets.each do |bucket| -%>
# these must be in this order to allow parsing of multiple entries
s3.begin
s3.url_style path
Expand All @@ -40,7 +40,7 @@ s3.end
<% end -%>
<% else -%>
# You must configure at least one bucket hiera
# buckets:
# xrootd_buckets:
# - name: my_bucket # bucket name
# url_style: path # path or virtual
# path_name: / # this is the path where it will be available on the xrootd side
Expand Down

0 comments on commit d1a5d4a

Please sign in to comment.