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

@ -14,6 +14,8 @@ short_description: Shut down a machine
notes:
- C(PATH) is ignored on the remote node when searching for the C(shutdown) command. Use I(search_paths)
to specify locations to search if the default paths do not work.
- The I(msg) and I(delay) options are not supported when a shutdown command is not found in I(search_paths), instead
the module will attempt to shutdown the system by calling C(systemctl shutdown).
description:
- Shut downs a machine.
version_added: "1.1.0"