Skip to content

Commit

Permalink
Adds basic Windows support for installing Consul.
Browse files Browse the repository at this point in the history
This is cargo-cult from the 0.11.1 release. Its going to be a little
hard to test this since I don't have any virtual machines.
  • Loading branch information
John Bellone committed Aug 6, 2015
1 parent 7f3038c commit 8628c51
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Vagrantfile

This file was deleted.

8 changes: 8 additions & 0 deletions libraries/consul_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ def action_create
only_if { new_resource.install_method == 'package' }
end

if node['platform'] == 'windows'
include_recipe 'chocolatey::default'

chocolatey new_resource.package_name do
version new_resource.version
end
end

if new_resource.install_method == 'binary'
artifact = libartifact_file "consul-#{new_resource.version}" do
artifact_name 'consul'
Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
supports 'redhat', '>= 6.4'
supports 'ubuntu', '>= 12.04'
supports 'arch'
supports 'windows'

depends 'chef-vault'
depends 'chocolatey'
depends 'golang', '~> 1.4'
depends 'firewall', '~> 1.6'
depends 'libartifact', '~> 1.3'
Expand Down

0 comments on commit 8628c51

Please sign in to comment.