On Wed, 6 Jan 2021 at 15:13,
lift...@gmail.com <
lift...@gmail.com> wrote:
> - name: Get healing total
> set_fact:
> total: "{{ home_sum|int }} + {{ nas_sum|int }} + {{ projects_sum|int }}"
You go in and out of jinja templating, but the entire expression is
still a string.
> home_sum is 2, nas_sum is 0, and projects_sum is 0. So I'd assume that the sum would be 2, however what is being calculated for the fact "total" is "2+0+0". I need the actual sum.
Doing the calculation entirely in jinja should work, i.e.:
total: "{{ home_sum|int + nas_sum|int + projects_sum|int }}"
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT