Skip to content

Commit 8628c51

Browse files
author
John Bellone
committedAug 6, 2015
Adds basic Windows support for installing Consul.
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.
1 parent 7f3038c commit 8628c51

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed
 

‎Vagrantfile

-23
This file was deleted.

‎libraries/consul_service.rb

+8
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ def action_create
9999
only_if { new_resource.install_method == 'package' }
100100
end
101101

102+
if node['platform'] == 'windows'
103+
include_recipe 'chocolatey::default'
104+
105+
chocolatey new_resource.package_name do
106+
version new_resource.version
107+
end
108+
end
109+
102110
if new_resource.install_method == 'binary'
103111
artifact = libartifact_file "consul-#{new_resource.version}" do
104112
artifact_name 'consul'

‎metadata.rb

+2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
supports 'redhat', '>= 6.4'
1313
supports 'ubuntu', '>= 12.04'
1414
supports 'arch'
15+
supports 'windows'
1516

1617
depends 'chef-vault'
18+
depends 'chocolatey'
1719
depends 'golang', '~> 1.4'
1820
depends 'firewall', '~> 1.6'
1921
depends 'libartifact', '~> 1.3'

0 commit comments

Comments
 (0)