diff options
author | Julien Pivotto <roidelapluie@inuits.eu> | 2015-08-04 10:28:47 +0200 |
---|---|---|
committer | Julien Pivotto <roidelapluie@inuits.eu> | 2015-08-04 10:28:47 +0200 |
commit | a0e5de9275bc9a83c0e37b457f12607527b90d96 (patch) | |
tree | bd584fc465f39d07280fb78aa68f41e045d51fbc | |
parent | 4f6bbaed1c9e9891218cc6e20ce19892308672c5 (diff) |
Add 'systemd-tmpfiles-create'
-rw-r--r-- | README.md | 26 | ||||
-rw-r--r-- | manifests/init.pp | 14 |
2 files changed, 33 insertions, 7 deletions
@@ -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', + } + } |