Open dancarltonigt opened 1 week ago
Hi @dancarltonigt ,
Thank you for raising this issue. We are aware of a known issue with the diff check function when handling list-of-dict-type arguments. However, I did not observe the specific issue you mentioned about it always grabbing the full route-map config with defaults.
Could you confirm if you are using the --check and --diff functions?
In my testing, when I modify an argument, it only reflects the intended change. Could you please provide more details or clarify your observations?
root@liang:~/ansible/fgt/github#355# ansible-playbook -i hosts fortios_router_route_map.yml --check --diff
PLAY [fortigates] *********************************************************************************************
TASK [Configure Router Route Maps] ****************************************************************************
--- before
+++ after
@@ -4,7 +4,7 @@
{
"action": "deny",
"id": 2,
- "match-as-path": "azr-path"
+ "match-as-path": "azr-path2"
}
]
}
changed: [fortigate03]
PLAY RECAP ****************************************************************************************************
fortigate03 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Thanks, Maxx
The route map module, fortios_router_route_map, always shows changes, because it always grab the full route-map config with defaults, instead of just the explicitly set parameters .
This behaviour is shown in 2.1.7 and 2.3.8.
Variable:
Playbook:
Debug output showing behaviour:
the items between ----------- are all default values that are not actually set.