mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00:35 +00:00
new function rand_from_array() returns a random element of an array
This commit is contained in:
parent
3d60cff446
commit
b2d6edad94
@ -16,6 +16,14 @@ class rsnapshot::config (
|
||||
ensure => 'directory',
|
||||
}
|
||||
|
||||
#$foo = ['1', '2', '3', '20..21']
|
||||
# $foo='*/5'
|
||||
#$qax = rand_from_array($foo)
|
||||
#notice("QAX is $qax ")
|
||||
|
||||
|
||||
|
||||
|
||||
# custom function, if only a hostname is given as a param, this is an empty hash
|
||||
# the next loop would break as puppet does not allow to reassign variables
|
||||
# the function checks $hosts for elements like:
|
||||
|
Loading…
Reference in New Issue
Block a user