edgeos_config detects changes where there are none #198
Labels
affects_2.9
bug
This issue/PR relates to a bug
module
module
needs_triage
plugins
plugin (any type)
python3
SUMMARY
When not passing
save: yes
to edgeos_config, it assumes that adelete
command that matches existing configuration actually means a change. However, if the same configuration is re-added later, nothing really changes (not even transiently, because all chnages are committed together)ISSUE TYPE
COMPONENT NAME
edgeos_config
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 18.04
STEPS TO REPRODUCE
EXPECTED RESULTS
The first task might change something, but the second effectively won't, because all settings are restored after the delete. This is actually useful to assert no other config exists at the same level (e.g. system name-servers, interface address, ...)
ACTUAL RESULTS
Both tasks supposedly change something.
ADDITIONAL NOTES
Currently, the module tries to determine which commands are necessary to execute in order to achieve the desired configuration by comparing the current (or provided) config with the commands in the invocation. Extending this to cover cases like these would certainly be possible, but an approximation at best.
In #184, support for diffs was added using the
compare
command. So I think it would be reasonable to use thecompare
command to determine changed status as well, since this is definitive: If that doesn't output any changes, the router won't change any configuration. Currently, it's possible to havechanged: true
but an empty diff.The text was updated successfully, but these errors were encountered: