mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-08-04 18:24:52 +02:00
Allow api module to fail (#39)
* Allow api module to fail. * Improve error handling. * Fix api unit tests. * Add very basic tests of return values. * Update api.py fix ignoring the Fail task if we get TrapError * Do not mangle fail result, and adjust tests. * Improve changelog fragment. * Reclassify changelog fragment as minor_changes, improve text. * Mark changelog as 'breaking change'. Co-authored-by: Nikolay Dachev <nikolay@dachev.info>
This commit is contained in:
parent
df88a7ec99
commit
69682054e1
3 changed files with 94 additions and 61 deletions
8
changelogs/fragments/39-api-fail.yml
Normal file
8
changelogs/fragments/39-api-fail.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
breaking_changes:
|
||||
- >-
|
||||
api - due to a programming error, the module never failed on errors. This has now been fixed.
|
||||
If you are relying on the module not failing in case of idempotent commands
|
||||
(resulting in errors like ``failure: already have such address``), you need to adjust your roles/playbooks.
|
||||
We suggest to use ``failed_when`` to accept failure in specific circumstances,
|
||||
for example ``failed_when: "'failure: already have ' in result.msg[0]"``
|
||||
(https://github.com/ansible-collections/community.routeros/pull/39).
|
Loading…
Add table
Add a link
Reference in a new issue