ansible.builtin.random (v2.16.0) — filter

random number or list item

| "added in version" 2.6 of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Use the input to either select a random element of a list or generate a random number.

Inputs

    
seed:
    description: If specified use a pseudo random selection instead (repeatable).
    type: str

step:
    default: 1
    description: Subsets the defined range by only using this value to select the increments
      of it between start and end.
    type: int

start:
    description: Bottom bound for the random number/element generated.
    type: int

_input:
    description: A number or list/sequence, if it is a number it is the top bound for
      random  number generation, if it is a sequence or list, the source of the random
      element selected.
    required: true
    type: raw

Outputs

_value:
  description: Random number or list element.
  type: raw