Manipulate with vars
- hosts: localhost vars: numbers: [1, 2, 3, 1] tasks: # use filters - debug: msg={{ numbers | random }}