diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-01 21:54:43 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-01 21:54:43 -0800 |
commit | f706c6a4183c5d2807ead7ed1c26cf2b8cfef921 (patch) | |
tree | b7d02c5f9dca846107d93569485698e57149af89 /lib/chef/provider/service | |
parent | 46d19a502fb8824fa3fccf4535fcfa226c4e9473 (diff) | |
download | chef-f706c6a4183c5d2807ead7ed1c26cf2b8cfef921.tar.gz |
support why-run by defaultlcg/default-whyrun-supported
this should fix several bugs in providers that look like they should
support whyrun but fail to declare it.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/aix.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/service/simple.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/windows.rb | 6 |
3 files changed, 2 insertions, 14 deletions
diff --git a/lib/chef/provider/service/aix.rb b/lib/chef/provider/service/aix.rb index 201f9ff5f9..dd74caf6ae 100644 --- a/lib/chef/provider/service/aix.rb +++ b/lib/chef/provider/service/aix.rb @@ -1,6 +1,6 @@ # # Author:: kaustubh (<kaustubh@clogeny.com>) -# Copyright:: Copyright 2014-2016, Chef Software, Inc. +# Copyright:: Copyright 2014-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -43,10 +43,6 @@ class Chef @current_resource end - def whyrun_supported? - true - end - def start_service if @is_resource_group shell_out!("startsrc -g #{@new_resource.service_name}") diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index d75e85989f..84ced52071 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -41,10 +41,6 @@ class Chef @current_resource end - def whyrun_supported? - true - end - def shared_resource_requirements super requirements.assert(:all_actions) do |a| diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 9bfd9238cd..931e320695 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -2,7 +2,7 @@ # Author:: Nuo Yan <nuo@chef.io> # Author:: Bryan McLellan <btm@loftninjas.org> # Author:: Seth Chisamore <schisamo@chef.io> -# Copyright:: Copyright 2010-2016, Chef Software Inc. +# Copyright:: Copyright 2010-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,10 +49,6 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service SERVICE_RIGHT = "SeServiceLogonRight" - def whyrun_supported? - false - end - def load_current_resource @current_resource = Chef::Resource::WindowsService.new(@new_resource.name) @current_resource.service_name(@new_resource.service_name) |