Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/7102-freebsd-shutdown-p.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Use shutdown -p ... with FreeBSD to half and power off machien with community.general.shutdown
derekschrock marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion plugins/action/shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ActionModule(ActionBase):
SHUTDOWN_COMMAND_ARGS = {
'alpine': '',
'void': '-h +{delay_min} "{message}"',
'freebsd': '-h +{delay_sec}s "{message}"',
'freebsd': '-p +{delay_sec}s "{message}"',
'linux': DEFAULT_SHUTDOWN_COMMAND_ARGS,
'macosx': '-h +{delay_min} "{message}"',
'openbsd': '-h +{delay_min} "{message}"',
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/targets/shutdown/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading