Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
Explicitly specify provider to be systemd for ubuntu 16.04. (#112)
Browse files Browse the repository at this point in the history
* Change metadata to include chef_version and license
  • Loading branch information
varshavaradarajan committed Mar 31, 2017
1 parent 4d11df7 commit 236f6cd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
artifactory (2.7.0)
artifactory (2.8.1)
ast (2.3.0)
aws-sdk (2.8.7)
aws-sdk-resources (= 2.8.7)
aws-sdk-core (2.8.7)
aws-sdk (2.9.0)
aws-sdk-resources (= 2.9.0)
aws-sdk-core (2.9.0)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.8.7)
aws-sdk-core (= 2.8.7)
aws-sdk-resources (2.9.0)
aws-sdk-core (= 2.9.0)
aws-sigv4 (1.0.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
backports (3.6.8)
backports (3.7.0)
berkshelf (5.6.4)
addressable (~> 2.3, >= 2.3.4)
berkshelf-api-client (>= 2.0.2, < 4.0)
Expand Down Expand Up @@ -91,13 +91,13 @@ GEM
fuzzyurl
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)
chef-zero (5.3.1)
chef-zero (5.3.2)
ffi-yajl (~> 2.2)
hashie (>= 2.0, < 4.0)
mixlib-log (~> 1.3)
rack (~> 2.0)
uuidtools (~> 2.1)
chefspec (6.1.0)
chefspec (6.2.0)
chef (>= 12.0)
fauxhai (>= 3.6, < 5)
rspec (~> 3.0)
Expand Down Expand Up @@ -125,12 +125,12 @@ GEM
excon (0.55.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fauxhai (4.0.1)
fauxhai (4.1.0)
net-ssh
ffi (1.9.18)
ffi-yajl (2.3.0)
libyajl2 (~> 1.2)
foodcritic (6.3.0)
foodcritic (10.2.0)
cucumber-core (>= 1.3)
erubis
nokogiri (>= 1.5, < 2.0)
Expand All @@ -140,7 +140,7 @@ GEM
yajl-ruby (~> 1.1)
formatador (0.2.5)
fuzzyurl (0.9.0)
gherkin (4.0.0)
gherkin (4.1.1)
gssapi (1.2.0)
ffi (>= 1.0.1)
guard (2.14.1)
Expand All @@ -153,8 +153,8 @@ GEM
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-foodcritic (2.1.0)
foodcritic (~> 6.0)
guard-foodcritic (3.0.0)
foodcritic (>= 8)
guard (~> 2.12)
guard-compat (~> 1.2)
guard-rspec (4.7.3)
Expand Down Expand Up @@ -234,7 +234,7 @@ GEM
net-ssh-gateway (>= 1.2.0)
net-telnet (0.1.1)
nio4r (2.0.0)
nokogiri (1.7.0.1)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
nori (2.6.0)
notiffany (0.1.1)
Expand Down Expand Up @@ -338,7 +338,7 @@ GEM
solve (3.1.0)
molinillo (>= 0.5)
semverse (>= 1.1, < 3.0)
specinfra (2.67.2)
specinfra (2.67.7)
net-scp
net-ssh (>= 2.7, < 5.0)
net-telnet
Expand All @@ -359,7 +359,7 @@ GEM
hitimes
treetop (1.6.8)
polyglot (~> 0.3)
tzinfo (1.2.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)
unicode-display_width (1.1.3)
uuidtools (2.1.5)
Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
version '1.3.2'
source_url 'https://github.com/gocd-contrib/go-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/gocd-contrib/go-cookbook/issues' if respond_to?(:issues_url)
chef_version '~> 12'
license 'Apache v2.0'

supports 'ubuntu'
supports 'centos'
Expand Down
1 change: 1 addition & 0 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
end

service(platform?('windows') ? 'Go Server' : 'go-server') do
provider Chef::Provider::Service::Systemd if platform?('ubuntu') && node['platform_version'].to_f >= 16.04
supports status: true, restart: true, start: true, stop: true
action [:enable, :start]
if node['gocd']['server']['wait_up']['retries'] != 0
Expand Down
1 change: 1 addition & 0 deletions resources/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
case node['gocd']['agent']['type']
when 'java'
service agent_name do
provider Chef::Provider::Service::Systemd if platform?('ubuntu') && node['platform_version'].to_f >= 16.04
supports status: true, restart: autoregister_values[:daemon], start: true, stop: true
action new_resource.service_action
end
Expand Down

0 comments on commit 236f6cd

Please sign in to comment.