Shutdown systemd without sysv (#6171)

* setup test

* inital working commit to enable shutdown using systemd

* add changelog fragment

* address sanity checks

* fix changelog fragement

* update to combine args and command

* fix self pararm

* fix pylint output

* cleanup test

* fix tests

* fix systemd missing failure message

* broaden test coverage

* address pr feedback

* address sanity test results

* fix tests

* fix tests

* pep8 sanity fix

* fix test conditional ordering

* quick fix for pep8

* Update changelogs/fragments/6171-shutdown-using-systemd.yml

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

* Update changelogs/fragments/6171-shutdown-using-systemd.yml

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

* Fix indentation.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Peter Upton 2023-05-09 13:10:09 -05:00 committed by GitHub
commit 88f7b5a675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 51 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- shutdown - if no shutdown commands are found in the ``search_paths`` then the module will attempt to shutdown the system using ``systemctl shutdown`` (https://github.com/ansible-collections/community.general/issues/4269, https://github.com/ansible-collections/community.general/pull/6171).