有人知道如何在ansible中对循环中的数字求和并设置为变量吗?
下列的:
- set_fact: total: "{{ sum(item | int) }}" <--- it's not work!!! loop: - 1 - 4 - 3 - debug: var=total
谢谢
sum ansible
ansible ×1
sum ×1