From ee6d8cea9d9ab83c55547375379990dd056af4ff Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:16:18 +0200 Subject: [PATCH] [PR #8710/c517f1c4 backport][stable-8] ensure util-linux-extra is installed in Ubuntu 24.04 (#8716) ensure util-linux-extra is installed in Ubuntu 24.04 (#8710) (cherry picked from commit c517f1c483c546542b7cf365925dfd75cce4ff66) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/modules/timezone.py | 3 ++- tests/integration/targets/timezone/tasks/main.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/modules/timezone.py b/plugins/modules/timezone.py index 790795140b..cd823e6115 100644 --- a/plugins/modules/timezone.py +++ b/plugins/modules/timezone.py @@ -49,7 +49,8 @@ options: aliases: [ rtc ] choices: [ local, UTC ] notes: - - On SmartOS the C(sm-set-timezone) utility (part of the smtools package) is required to set the zone timezone + - On Ubuntu 24.04 the C(util-linux-extra) package is required to provide the C(hwclock) command. + - On SmartOS the C(sm-set-timezone) utility (part of the smtools package) is required to set the zone timezone. - On AIX only Olson/tz database timezones are usable (POSIX is not supported). An OS reboot is also required on AIX for the new timezone setting to take effect. Note that AIX 6.1+ is needed (OS level 61 or newer). diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 721341592a..475f22447d 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -60,6 +60,14 @@ state: present when: ansible_distribution == 'Alpine' +- name: make sure hwclock is installed in Ubuntu 24.04 + package: + name: util-linux-extra + state: present + when: + - ansible_distribution == 'Ubuntu' + - ansible_facts.distribution_major_version is version('24', '>=') + - name: make sure the dbus service is started under systemd systemd: name: dbus