Skip to content

Commit

Permalink
Enable adding extra environment variable to profile
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Jul 13, 2023
1 parent 804396d commit 8d16cd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/profile/manifests/cvmfs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Array[String] $repositories,
Array[String] $lmod_default_modules,
Array[String] $alien_cache_repositories = [],

Hash[String, String] $extra_profile_var = {},
) {
include consul_template
include profile::cvmfs::local_user
Expand Down Expand Up @@ -84,6 +84,7 @@
{
'lmod_default_modules' => $lmod_default_modules,
'initial_profile' => $initial_profile,
'extra_profile_var' => $extra_profile_var,
}
),
}
Expand Down
4 changes: 4 additions & 0 deletions site/profile/templates/cvmfs/z-01-site.sh.epp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ if [[ $UID -gt <%= $::uid_max %> ]]; then
if [[ -r <%= $initial_profile %> ]]; then
source <%= $initial_profile %>
fi

<% $extra_profile_var.each | $key, $value| { -%>
export <%= $key %>=<%= $value %>
<% } -%>
fi

0 comments on commit 8d16cd0

Please sign in to comment.