diff options
Diffstat (limited to 'lib/chef/resource/systemd_unit.rb')
-rw-r--r-- | lib/chef/resource/systemd_unit.rb | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/lib/chef/resource/systemd_unit.rb b/lib/chef/resource/systemd_unit.rb index 61294d833d..c802ab71dc 100644 --- a/lib/chef/resource/systemd_unit.rb +++ b/lib/chef/resource/systemd_unit.rb @@ -30,45 +30,45 @@ class Chef description "Use the **systemd_unit** resource to create, manage, and run [systemd units](https://www.freedesktop.org/software/systemd/man/systemd.html#Concepts)." introduced "12.11" examples <<~DOC - **Create systemd service unit file from a Hash** - - ```ruby - systemd_unit 'etcd.service' do - content({ Unit: { - Description: 'Etcd', - Documentation: ['https://coreos.com/etcd', 'man:etcd(1)'], - After: 'network.target', - }, - Service: { - Type: 'notify', - ExecStart: '/usr/local/etcd', - Restart: 'always', - }, - Install: { - WantedBy: 'multi-user.target', - } }) - action [:create, :enable] - end - ``` + **Create systemd service unit file from a Hash** + + ```ruby + systemd_unit 'etcd.service' do + content({ Unit: { + Description: 'Etcd', + Documentation: ['https://coreos.com/etcd', 'man:etcd(1)'], + After: 'network.target', + }, + Service: { + Type: 'notify', + ExecStart: '/usr/local/etcd', + Restart: 'always', + }, + Install: { + WantedBy: 'multi-user.target', + } }) + action [:create, :enable] + end + ``` - **Create systemd service unit file from a String** + **Create systemd service unit file from a String** - ```ruby - systemd_unit 'sysstat-collect.timer' do - content <<~EOU - [Unit] - Description=Run system activity accounting tool every 10 minutes + ```ruby + systemd_unit 'sysstat-collect.timer' do + content <<~EOU + [Unit] + Description=Run system activity accounting tool every 10 minutes - [Timer] - OnCalendar=*:00/10 + [Timer] + OnCalendar=*:00/10 - [Install] - WantedBy=sysstat.service - EOU + [Install] + WantedBy=sysstat.service + EOU - action [:create, :enable] - end - ``` + action [:create, :enable] + end + ``` DOC default_action :nothing |