summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorPhil Dibowitz <phil@ipom.com>2016-03-08 09:25:34 -0800
committerPhil Dibowitz <phil@ipom.com>2016-03-08 09:25:34 -0800
commitc54f2fe21ea9b0119b82bbcf7f313ee8f68f7b38 (patch)
treeef4e99a8a8195427a2a6d523c017841f348d75c3 /lib/chef/resource
parent211ae6a47aedbd7a81042bdd42f577f0d11f8b85 (diff)
parent7f8af07e287282aefdb55bea57f50c05318787f2 (diff)
downloadchef-c54f2fe21ea9b0119b82bbcf7f313ee8f68f7b38.tar.gz
Merge pull request #4661 from davide125/systemd-user
Extend service resource to support systemd user services
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 860d5b05ff..1ca4b84af0 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -47,6 +47,7 @@ class Chef
@priority = nil
@timeout = nil
@run_levels = nil
+ @user = nil
@supports = { :restart => nil, :reload => nil, :status => nil }
end
@@ -193,6 +194,14 @@ class Chef
:kind_of => [ Array ] )
end
+ def user(arg = nil)
+ set_or_return(
+ :user,
+ arg,
+ :kind_of => [ String ]
+ )
+ end
+
def supports(args = {})
if args.is_a? Array
args.each { |arg| @supports[arg] = true }