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

flatten lists within a list

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

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

For a given list, take any elements that are lists and insert their elements into the parent list directly.

Inputs

    
_input:
    description: First dictionary to combine.
    required: true
    type: dict

levels:
    description: Number of recursive list depths to flatten.
    type: int

skip_nulls:
    default: true
    description: Skip V(null)/V(None) elements when inserting into the top list.
    type: bool

Outputs

_value:
  description: The flattened list.
  type: list