1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] e11bf7d788
Support older version of psutil (RHEL7 and RHEL6) (#2808) (#3189)
* Support older version of psutil (RHEL7 and RHEL6)

The psutil python module is a true mess, they changed the API twice. The function arguments, as well as the objects that are returned.
The documentation does not make it clear which version supports what so the safest implementation is this waterfall approach.

A better approach would be to inspect the returned information, rather than trust a version, but that would not be any more efficient.
In the end it is better to have something that at least works out-of-the-box on all platforms than something that requires custom updates to system packages before it works as expected. Especially for something as basic as `pids`.

* A little bit more concise

* Apply suggestions from code review

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b5d6457611)

Co-authored-by: Dag Wieers <dag@wieers.com>
2021-08-10 08:08:50 +02:00
..
action fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
become Update BOTMETA, fix some plugin authors, improve BOTMETA extra sanity test (#3069) (#3087) 2021-07-26 14:13:28 +02:00
cache fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
callback fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
connection fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
doc_fragments fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
filter fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
inventory fixed the utf-8 marker (#3162) (#3165) 2021-08-07 15:59:29 +02:00
lookup mass-added the utf-8 marker (#3163) (#3170) 2021-08-08 11:48:54 +02:00
module_utils mass-added the utf-8 marker (#3163) (#3170) 2021-08-08 11:48:54 +02:00
modules Support older version of psutil (RHEL7 and RHEL6) (#2808) (#3189) 2021-08-10 08:08:50 +02:00