problem with conditional and facts,

I did a quick play which has a conditional:

when: ansible_swaptotal_mb == “2047”

this conditional never evaluates as true, if I debug:

debug: var=ansible_swaptotal_mb

I get

ok: [hostname] => {
“ansible_swaptotal_mb”: “2047”
}

it seems to me my when statement would evaluate as true?
I have the same issue when I try “ansible_lsb.id”

what am I doing wrong here?

try:

when: ansible_swaptotal_mb == 2047

no quotes

thank you…I feel ashamed that I obviously had not tried that rather obvious solution…

no shame, sometimes when immersed in a problem, it is hard to see the
obvious (forest/trees saying).