[PR #7102/55cfd27b backport][stable-7] freebsd: shutdown -p ... on freebsd to power off machine (#7112)

freebsd: shutdown -p ... on freebsd to power off machine (#7102)

* freebsd: shutdown -p ... on freebsd to power off machine

* Use shutdown -p ... on FreeBSD such that the machine is halted and
  powered off (-p) otherwise the machine is halted (-h) but remains on.

* Update changelogs/fragments/7102-freebsd-shutdown-p.yml

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

---------

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

Co-authored-by: Derek Schrock <dereks@lifeofadishwasher.com>
This commit is contained in:
patchback[bot] 2023-08-14 21:19:16 +02:00 committed by GitHub
commit d4eaef2d83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -77,8 +77,8 @@
- name: Verify shutdown delay is present in seconds in FreeBSD
assert:
that:
- '"-h +100s" in shutdown_result["shutdown_command"]'
- '"-h +0s" in shutdown_result_minus["shutdown_command"]'
- '"-p +100s" in shutdown_result["shutdown_command"]'
- '"-p +0s" in shutdown_result_minus["shutdown_command"]'
when: ansible_system == 'FreeBSD'
- name: Verify shutdown delay is present in seconds in Solaris, SunOS