G
G
gremlintv22019-01-20 19:12:25
Ansible
gremlintv2, 2019-01-20 19:12:25

ANSIBLE How to do arithmetic operations in playbook?

Hello. Please help with an example:
You need to substitute the amount of RAM on the server in the template, divide by 2 and round to a whole number.
Thanks for your help and time. New to Ansible.
Found examples using the debug module. But there is no example using hosts variables, or is the value in brackets instead of numbers just substituted in the playbook (as in the examples )?
{{ ansible_memory_mb.real.total }}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gremlintv2, 2019-01-20
@gremlintv2

Thank you for your attention, I can say that I found it . Sorry ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question