summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Pinson <github+aem1eeshi1@raphink.net>2015-08-04 14:39:15 +0200
committerRaphaël Pinson <github+aem1eeshi1@raphink.net>2015-08-04 14:39:15 +0200
commitd39d372cc52d3040a2a32302451dc5398db2f1f8 (patch)
treebd584fc465f39d07280fb78aa68f41e045d51fbc
parent4f6bbaed1c9e9891218cc6e20ce19892308672c5 (diff)
parenta0e5de9275bc9a83c0e37b457f12607527b90d96 (diff)
Merge pull request #1 from Inuits/master
Add 'systemd-tmpfiles-create'
-rw-r--r--README.md26
-rw-r--r--manifests/init.pp14
2 files changed, 33 insertions, 7 deletions
diff --git a/README.md b/README.md
index 283ebdb..f70bcb0 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,15 @@
-Systemd
-=======
+# 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
---------
+## Overview
-This module just declares an `Exec['systemctl-daemon-reload']` resource that you can use to refresh the daemon.
+This module declares exec resources that you can use when you change systemd units or configuration files.
+
+## Examples
+
+### systemctl --daemon-reload
```puppet
include ::systemd
@@ -20,3 +22,17 @@ file { '/usr/lib/systemd/system/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']
+```
diff --git a/manifests/init.pp b/manifests/init.pp
index b466c64..5e6ad79 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,8 +1,18 @@
class systemd {
- exec { 'systemctl-daemon-reload':
- command => 'systemctl daemon-reload',
+ Exec {
refreshonly => true,
path => $::path,
}
+
+ exec {
+ 'systemctl-daemon-reload':
+ command => 'systemctl daemon-reload',
+ }
+
+ exec {
+ 'systemd-tmpfiles-create':
+ command => 'systemd-tmpfiles --create',
+ }
+
}