MOON
Server: Apache
System: Linux kvm.asjudinet.com 5.14.0-611.54.6.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 04:23:18 EDT 2026 x86_64
User: asjudine (1001)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3.9/site-packages/ansible/plugins/filter/permutations.yml
DOCUMENTATION:
  name: permutations
  version_added: "historical"
  short_description: permutations from the elements of a list
  description:
    - Create a list of the permutations of lists from the elements of a list.
    - Unlike combinations, in permutations order is significant.
  positional: _input, list_size
  options:
    _input:
      description: Elements to base the permutations on.
      type: list
      required: true
    list_size:
      description: The size of the list for each permutation.
      type: int
      required: true

EXAMPLES: |
  # ptrs_of_two => [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 2, 1 ], [ 2, 3 ], [ 2, 4 ], [ 2, 5 ], [ 3, 1 ], [ 3, 2 ], [ 3, 4 ], [ 3, 5 ], [ 4, 1 ], [ 4, 2 ], [ 4, 3 ], [ 4, 5 ], [ 5, 1 ], [ 5, 2 ], [ 5, 3 ], [ 5, 4 ] ]
  prts_of_two:  "{{ [1,2,3,4,5] | permutations(2) }}"

RETURN:
  _value:
    description: List of permutations lists resulting from the supplied elements and list size.
    type: list