[icinga2_host.py] Actually return codes instead of data (#335)

* [icinga2_host.py] Actually return codes instead of data

Currently the module tries to return the `data`, which can result in a blank message instead of the code being shown.

```
 "msg": "bad return code creating host: "
```

* add changelog fragment

* Update changelogs/fragments/335-icinga2_host-return-error-code.yaml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* return code and data on fail

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Martin
2020-12-02 07:38:56 +01:00
committed by GitHub
parent 1d8530aff1
commit 70ba401602
2 changed files with 5 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- icinga2_host - fix returning error codes (https://github.com/ansible-collections/community.general/pull/335).