dev/provisioning/modules/systemd/README.md
author ymh <ymh.work@gmail.com>
Thu, 16 Nov 2017 16:31:48 +0100
changeset 555 51023e5eae05
parent 146 dc4d1cdc47e0
permissions -rw-r--r--
Added tag 0.0.24 for changeset f28a539ba106

# Systemd

[![Puppet Forge](http://img.shields.io/puppetforge/v/camptocamp/systemd.svg)](https://forge.puppetlabs.com/camptocamp/systemd)
[![Build Status](https://travis-ci.org/camptocamp/puppet-systemd.png?branch=master)](https://travis-ci.org/camptocamp/puppet-systemd)

## Overview

This module declares exec resources that you can use when you change systemd units or configuration files.

## Examples

### systemctl --daemon-reload

```puppet
include ::systemd
file { '/usr/lib/systemd/system/foo.service':
  ensure => file,
  owner  => 'root',
  group  => 'root',
  mode   => '0644',
  source => "puppet:///modules/${module_name}/foo.service",
} ~>
Exec['systemctl-daemon-reload']
```

### systemd-tmpfiles --create

```puppet
include ::systemd
file { '/etc/tmpfiles.d/foo.conf':
  ensure => file,
  owner  => 'root',
  group  => 'root',
  mode   => '0644',
  source => "puppet:///modules/${module_name}/foo.conf",
} ~>
Exec['systemd-tmpfiles-create']
```