#
# Cookbook Name:: ntp
# Recipe:: windows_client
# Author:: Timothy Smith (<tim.smith@webtrends.com>)
#
# Copyright 2012, Webtrends, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

directory "C:\NTP" do
  inherits true
  action :create
end

cookbook_file "C:\NTP\ntp.ini" do
  source "ntp.ini"
  inherits true
  action :create
end

if !File.exists?("C:/NTP/bin/ntpd.exe")
  remote_file "#{Chef::Config[:file_cache_path]}/ntpd.exe" do
    source node[:ntp][:package_url]
  end

  execute "ntpd_install" do
    command "ntpd.exe /USEFILE=C:\\NTP\\ntp.ini"
  end
end

#
# Cookbook Name:: ntp
# Recipe:: windows_client
# Author:: Timothy Smith (<tim.smith@webtrends.com>)
#
# Copyright 2012, Webtrends, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

directory "C:\NTP" do
  inherits true
  action :create
end

cookbook_file "C:\NTP\ntp.ini"
  source "ntp.ini"
  inherits true
  action :create
end

if !File.exists?("C:/NTP/bin/ntpd.exe")
	remote_file "#{Chef::Config[:file_cache_path]}/ntpd.exe" do
		source node[:ntp][:package_url]
	end
  
  execute "ntpd_install" do
		command "ntpd.exe /USEFILE=C:\\NTP\\ntp.ini"
  end
end

--- 
+++ 
@@ -22,18 +22,18 @@
   action :create
 end
 
-cookbook_file "C:\NTP\ntp.ini"
+cookbook_file "C:\NTP\ntp.ini" do
   source "ntp.ini"
   inherits true
   action :create
 end
 
 if !File.exists?("C:/NTP/bin/ntpd.exe")
-	remote_file "#{Chef::Config[:file_cache_path]}/ntpd.exe" do
-		source node[:ntp][:package_url]
-	end
-  
+  remote_file "#{Chef::Config[:file_cache_path]}/ntpd.exe" do
+    source node[:ntp][:package_url]
+  end
+
   execute "ntpd_install" do
-		command "ntpd.exe /USEFILE=C:\\NTP\\ntp.ini"
+    command "ntpd.exe /USEFILE=C:\\NTP\\ntp.ini"
   end
 end
Swap tabs for spaces and add a missing do


Former-commit-id: ab337109d79a480d897f4ab29e2b54bcfce8f76e [formerly e4cf84e6a326dc2429480982f6a0fef39d822d90] [formerly 3df1aeb958049434e7e85539038aa4e1760b1b63 [formerly 2c4f609998a5239f7c2647296c800bfeade5d18e]]
Former-commit-id: 89705e15c2225a2f8fdbc8a042c30903d51d9fd2 [formerly b3ee7f6284381adc2ccdbef4da3d2c937ac89b50]
Former-commit-id: e6c53f4394eaa25868f7be7503ff267b6588a480