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

intersection of lists

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

Authors: Brian Coca (@bcoca)

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Provide a list with the common elements from other lists.

Items in the resulting list are returned in arbitrary order.

Inputs

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

_second_list:
    description: A list.
    required: true
    type: list

Outputs

_value:
  description: A list with unique elements common to both lists, also known as a set.
  type: list

See also