summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_service.rb
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2014-08-07 17:25:56 -0400
committerBryan McLellan <btm@loftninjas.org>2014-08-12 16:51:10 -0400
commit940479ea0bbd5c8f2feeb1293db63cd396a484aa (patch)
tree45ffe6eddbf52229995f48a4e63cefe8b0da4ff6 /lib/chef/resource/windows_service.rb
parentf7dc2d50db5e780c7c0148f8895d84a3fd0fdf3d (diff)
downloadchef-940479ea0bbd5c8f2feeb1293db63cd396a484aa.tar.gz
CHEF-5022: Add configure_startup action
enable and disable actions will continue to set the startup type to automatic/disabled If you want the startup type to be manual, you can set the startup_type attribute and use action configure_startup. It also supports automatic and disabled.
Diffstat (limited to 'lib/chef/resource/windows_service.rb')
-rw-r--r--lib/chef/resource/windows_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_service.rb b/lib/chef/resource/windows_service.rb
index 3f207b5014..42b256c4a7 100644
--- a/lib/chef/resource/windows_service.rb
+++ b/lib/chef/resource/windows_service.rb
@@ -32,6 +32,7 @@ class Chef
super
@resource_name = :windows_service
@provider = Chef::Provider::Service::Windows
+ @allowed_actions.push(:configure_startup)
@startup_type = :automatic
end
@@ -42,7 +43,7 @@ class Chef
set_or_return(
:startup_type,
arg,
- :equal_to => [ :automatic, :manual ]
+ :equal_to => [ :automatic, :manual, :disabled ]
)
end
end