Closed trevharmon closed 8 years ago
Contains all changes of PR #14
Please rebase off of master
now that the cleanup PR has been merged.
@trevharmon To keep the footprint of this script as low as possible by default, can you restructure the code such that configuring NTP is disabled by default?
Configuring NTP is now disabled by default via the set_ntp_servers
parameter.
@trevharmon So, after thinking about your PR's, I've come to the conclusion that the logic to set DNS or NTP should be handled by flags to the powershell script; they should not be configured by parameters to the Puppet code.
By making these parameters to Puppet code, the powershell script can only ever be used in one way. This is not ideal in the case where you want to install the Puppet agent on many Windows boxes where some might need DNS, some might need NTP, some might need both, and some might need none.
If you think you can rewrite the Powershell to handle all the logic, then please submit a new PR to do so. If not, I think this is a good feature, and I will try to implement it myself.
Let me know what you think. I'm planning on closing this PR and #16 as well, but I'll keep them open for a bit to have a place to converse.
Will resubmit PR once it's cleaned up.
Sounds good @trevharmon 👍 Thanks for working on this.
See #17
This commit uses the
W32tm
service to sync the clock of the system. It does require the current time be within a certain range, otherwise it will complain and ask for manual intervention.The service is stopped, the new setting are applied, and then a time sync is forced once the service has been restarted. If this fails, the script waits several seconds and then retries the action. If it fails a second time, the script aborts with an error message.