mirror of https://github.com/ansible/ansible.git
[2.9] service_facts: fix for systemd 245
* service_facts: fix for systemd 245
Since systemd 245, `systemctl list-unit-files` comes with a new column
"VENDOR PRESET" [1] and breaks the service_facts module:
This patch drops the third column to make it work with old and new
systemd. With the new slice operation, IndexError instead of ValueError
is raised if the output contains less than 2 columns.
Test plan: running `ansible-test integration -v service_facts` on
up-to-date Arch Linux
[1] https://github.com/systemd/systemd/pull/14445
* add changelog
Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit bd4fdb1ca2
)
pull/69271/head
parent
28cc8e6155
commit
fbf93db4a8
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- service_facts - Now correctly parses systemd list-unit-files for systemd >=245
|
Loading…
Reference in New Issue