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

Let knife-windows find the template based on distro supplied. #38

Merged
merged 2 commits into from
Sep 17, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ gemspec

group :development do
gem 'rake'
gem 'knife-windows', :git => 'https://github.com/opscode/knife-windows.git', :branch => 'knife-cloud'
gem 'knife-windows'
end
4 changes: 0 additions & 4 deletions lib/chef/knife/cloud/chefbootstrap/windows_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ class Chef
class Knife
class Cloud
class WindowsDistribution < BootstrapDistribution

include Chef::Knife::TemplateFinder # This is included to expose get_template method from windows distribution.

def initialize(config)
super
config[:distro] ||= "windows-chef-client-msi"
@template = get_template(config)
end
end
end
Expand Down
4 changes: 0 additions & 4 deletions spec/unit/windows_distribution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@
expect {Chef::Knife::Cloud::WindowsDistribution.new(@config)}.to_not raise_error
expect(Chef::Knife::Cloud::WindowsDistribution.new(@config).class).to eq(Chef::Knife::Cloud::WindowsDistribution)
end

it "returns the windows template when bootstrap protocol is winrm." do
Chef::Knife::Cloud::WindowsDistribution.new(@config).template.should match "windows-chef-client-msi.erb"
end
end
end