Skip to content

root

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 1.9.

Synopsis

  • Math operation that returns the Nth root of inputed number C(X ^^ N).

Parameters

Parameter Defaults / Choices Comments
_input
float
required
Number to operate on.
base
float
Default: 2
Which root to take.

Examples

# => 8
fiveroot: "{{ 32768 | root(5) }}"

# 2
sqrt_of_2: "{{ 4 | root }}"

# me ^^ 3
cuberoot_me: "{{ me | root(3) }}"

Return Values

Key Data Type Description Returned
_value float Resulting number.