What does {{ vars|random }} do ?

Looking over some ansible ec2 script I see reference to:

“{{ vars|random }}”

e.g.

vpc_subnet_id: “{{ ec2_subnet_id|random }}”
(http://allandenot.com/devops/2015/01/31/provisioning-ec2-hosts-with-ansible.html)

Does this randomly select the variable, if so why would anyone would to do that?

This is a filter - have a look at the documentation here: http://docs.ansible.com/ansible/playbooks_filters.html#random-number-filter

I remember reading about it now, I can see its use for multiple VPC setup.