-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add filterfunction to speedup things
- Loading branch information
Showing
11 changed files
with
99 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# | ||
# | ||
module Puppet::Parser::Functions | ||
newfunction(:uidfilterbygid, :type => :rvalue, :doc =><<-EOS | ||
This function queries the password file and filters for grid pool accounts. | ||
it returns a two dimensional hash containing uids and gids for these accounts | ||
EOS | ||
) do |args| | ||
uidmap=args[0] | ||
gid=args[1] | ||
|
||
filtered = Hash.new() | ||
filtered["uid"] = Hash.new() | ||
filtered["gid"] = Hash.new() | ||
|
||
uidmap["uid"].each { |key, value| | ||
thisgid = uidmap["gid"][key] | ||
if thisgid == gid.to_s | ||
filtered["uid"][key] = value | ||
# to be removed later once the additional defaultgid parameter works | ||
filtered["gid"][key] = gid | ||
end | ||
} | ||
return filtered | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class vosupport::uidmap { | ||
$uidmap = getuids([]) | ||
$vo2gidmap = hiera("vo2gidmap", undef) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class vosupport::vos::atlas() | ||
{ | ||
vosupport::enable_vo { | ||
'atlas': | ||
enable_mappings_for_service => "ARGUS" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class vosupport::vos::dteam() | ||
{ | ||
vosupport::enable_vo { | ||
'dteam': | ||
enable_mappings_for_service => "ARGUS" | ||
} | ||
|
||
} |