ansible.builtin.product (v2.16.5) — filter

cartesian product of lists

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

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Combines two lists into one with each element being the product of the elements of the input lists.

Creates 'nested loops'. Looping over C(listA) and C(listB) is the same as looping over C(listA | product(listB)).

Inputs

    
_input:
    description: First list.
    required: true
    type: list

repeat:
    default: 1
    description: Number of times to repeat the product against itself.
    type: int

_additional_lists:
    description: Additional list for the product.
    required: false
    type: list

Outputs

_value:
  description: List of lists of combined elements from the input lists.
  elements: list
  type: list