From c0e69b972b7f534ddc5e397b58340e7622ec6d0a Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:27:14 +0100 Subject: [PATCH] refactor(config-time): simplify it --- src/playbook/Configuration/tweaks/misc/config-time.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/playbook/Configuration/tweaks/misc/config-time.yml b/src/playbook/Configuration/tweaks/misc/config-time.yml index b9d2d957c7..8b1cef0e10 100644 --- a/src/playbook/Configuration/tweaks/misc/config-time.yml +++ b/src/playbook/Configuration/tweaks/misc/config-time.yml @@ -4,13 +4,7 @@ description: Configures time servers to be more reliable and accurate than the d privilege: TrustedInstaller actions: # https://www.pool.ntp.org/en/use.html - - # Change NTP server from Windows' server to pool.ntp.org - - !run: {exe: 'net', args: 'start w32time'} + - !service: {name: "w32time", operation: start, ignoreErrors: true} - !run: {exe: 'w32tm', args: '/config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"'} - - # Resync time to pool.ntp.org - - !run: {exe: 'net', args: 'stop w32time'} - - !run: {exe: 'net', args: 'start w32time'} - !run: {exe: 'w32tm', args: '/config /update'} - !run: {exe: 'w32tm', args: '/resync'}