summaryrefslogtreecommitdiff
path: root/lib/chef/provider/systemd_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/systemd_unit.rb')
-rw-r--r--lib/chef/provider/systemd_unit.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/chef/provider/systemd_unit.rb b/lib/chef/provider/systemd_unit.rb
index c5cd9a1960..f1b104de21 100644
--- a/lib/chef/provider/systemd_unit.rb
+++ b/lib/chef/provider/systemd_unit.rb
@@ -232,14 +232,15 @@ class Chef
end
end
- def manage_unit_file(action = :nothing)
- Chef::Resource::File.new(unit_path, run_context).tap do |f|
- f.owner "root"
- f.group "root"
- f.mode "0644"
- f.content new_resource.to_ini
- f.verify :systemd_unit if new_resource.verify
- end.run_action(action)
+ def manage_unit_file(the_action = :nothing)
+ file unit_path do
+ owner "root"
+ group "root"
+ mode "0644"
+ content new_resource.to_ini
+ verify :systemd_unit if new_resource.verify
+ action the_action
+ end
end
def daemon_reload