diff --git a/changelogs/fragments/82383-fix-boot-time-command-on-freebsd.yml b/changelogs/fragments/82383-fix-boot-time-command-on-freebsd.yml new file mode 100644 index 00000000000..90180a0ecd8 --- /dev/null +++ b/changelogs/fragments/82383-fix-boot-time-command-on-freebsd.yml @@ -0,0 +1,2 @@ +bugfixes: + - reboot - Previously, on FreeBSD the boot time was used to verify that a target really rebooted. Unfortunately, it's not a fixed value and may change e.g. due to NTP updates leading to sporadic issues. Therefore, ansible is using the boot_id sysctl now. (https://github.com/ansible/ansible/pull/82383) diff --git a/lib/ansible/plugins/action/reboot.py b/lib/ansible/plugins/action/reboot.py index f92f8406585..d5e935ea221 100644 --- a/lib/ansible/plugins/action/reboot.py +++ b/lib/ansible/plugins/action/reboot.py @@ -50,7 +50,7 @@ class ActionModule(ActionBase): DEPRECATED_ARGS = {} # type: dict[str, str] BOOT_TIME_COMMANDS = { - 'freebsd': '/sbin/sysctl kern.boottime', + 'freebsd': '/sbin/sysctl -x kern.boot_id', 'openbsd': '/sbin/sysctl kern.boottime', 'macosx': 'who -b', 'solaris': 'who -b',