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

tzutil complains about wrong number of arguments #7

Open
hboetes opened this issue Dec 18, 2018 · 0 comments
Open

tzutil complains about wrong number of arguments #7

hboetes opened this issue Dec 18, 2018 · 0 comments

Comments

@hboetes
Copy link

hboetes commented Dec 18, 2018

Hi there, I got this error:

Notice: /Stage[main]/Windowstime/Exec[C:\Windows\system32\tzutil.exe /s 'Central European Standard Time']/returns: TZUTIL: Ungültige Anzahl von Argumenten für "/s".
Notice: /Stage[main]/Windowstime/Exec[C:\Windows\system32\tzutil.exe /s 'Central European Standard Time']/returns: Zeigen Sie mithilfe von "TZUTIL /?" eine Liste mit gültigen Optionen an.

Which is German for wrong number of arguments. There is an easy fix:

diff --git a/manifests/init.pp b/manifests/init.pp
index 44012ed..89de205 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -88,7 +88,7 @@ class windowstime (
     validate_re($timezone, $timezones, 'The specified string is not a valid Timezone')
     if $timezone != $facts['timezone'] {
       $system32dir = $facts['os']['windows']['system32']
-      exec { "${system32dir}\\tzutil.exe /s ${timezone}":
+      exec { "${system32dir}\\tzutil.exe /s \"${timezone}\"":
       }
     }
   }

Sorry, I'm too busy for a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant