I’m setting 2 facts from a custom filter, which appears to be working, but when I go to use those facts in the playbook they aren’t there…
set_fact:
ilom_gw: “{{ ilom_ip | ilom_net(item.gateway,item.mask) }}”
ilom_mask: “{{ ilom_ip | ilom_net(item.gateway,item.mask, return_value=‘mask’) }}”
with_items: iloms
here’s the output of that task:
{
"changed": false,
"msg": "All items completed",
"results": [
{
"_ansible_no_log": false,
"ansible_facts": {
**"ilom_gw": "10.224.64.1",**
**"ilom_mask": "255.255.248.0"**
},
as you can see both ilom_gw and ilom_mask are set here, but then:
debug: var=ilom_gw
[mgmt_port:debug] ilom_gw
2016-10-26 15:31:29+00:00 (0:01:05)
Changed = False
JSON : {
"_ansible_no_log": false,
"_ansible_verbose_always": true,
"changed": false,
**"ilom_gw": false**
}
debug: var=ilom_mask
[mgmt_port:debug] ilom_mask
2016-10-26 15:31:30+00:00 (0:01:06)
Changed = False
JSON : {
"_ansible_no_log": false,
"_ansible_verbose_always": true,
"changed": false,
**"ilom_mask": false**
}
And I swear when I tested this yesterday it worked as expected, but then today it’s broken… what am I missing?