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

the difference of one list from another

| "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 unique list of all the elements of the first list that do not appear in the second one.

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 unique list of the elements from the first list that do not appear
    on the second.
  type: list

See also