Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8393019
cron_rand.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
529 B
Subscribers
None
cron_rand.pp
View Options
# Randomize a cron run
function
profile
::
cron_rand
(
Hash
[
Enum
[
'minute'
,
'hour'
,
'month'
,
'monthday'
,
'weekday'
],
Variant
[
Integer
,
String
,
Undef
]]
$data,
String
$seed,
)
{
$maxima
=
{
'minute'
=>
60
,
'hour'
=>
24
,
'month'
=>
12
,
'monthday'
=>
31
,
'weekday'
=>
7
,
}
Hash
(
map
(
$maxima)
|
$key,
$max|
{
[
$key,
case
$data
[
$key
]
{
'fqdn_rand'
:
{
fqdn_rand
(
$max,
"${seed}_${key}"
)}
undef
:
{
'*'
}
default
:
{
$data
[
$key
]}
},
]
}
)
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 7:07 PM (10 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3296702
Attached To
rSPSITE puppet-swh-site
Event Timeline
Log In to Comment