Forgot to reply on list, but we solved it with fqdn_rotate() doing most
of the work.
$_ldap_servers = ['ldap1','ldap2','ldap3']
$ldap_uri =
join(suffix(prefix(fqdn_rotate(sort($_ldap_servers))),'ldaps://'),'/'),' ')
Ramin
On 7/24/2017 7:24 AM, Rob Nelson wrote:
I did just notice this line,
I did just notice this line, which should remove the .shuffle so it's
consistent on every run:
server_list = @_ldap_servers.shuffle
Rob Nelson
rnels...@gmail.com
On Mon, Jul 24, 2017 at 7:45 AM, Martijn wrote:
> I think that's perfect for the OP's use case. And if you need multiple
>
I think that's perfect for the OP's use case. And if you need multiple
random numbers there's a useful second parameter to fqdn_rand(), the
"seed", which can be any string or integer and allows you to get multiple
different random numbers on the same host.
So, you could use the server_list.size
You could try fqdn_rand(). Fqdn_rand will generate a random number, but the
same random number for a given fqdn, so you would get the same value every
time rather than it changing.
https://docs.puppet.com/puppet/latest/function.html#fqdnrand
On Sun, Jul 23, 2017 at 1:20 AM MK wrote:
> Does anyon
Does anyone have experiences randomizing the order of redundant server
names in the client configuration and won't change the order during next
puppet agent runs?
For example, I have a bunch of ldap slave servers put in an array:
$_ldap_servers = ['ldap1' , 'ldap2', 'ldap3']
I want to randomi