| author | ymh <ymh.work@gmail.com> |
| Tue, 15 Nov 2016 18:27:17 +0100 | |
| changeset 426 | d8ae6c0c0a0a |
| parent 146 | dc4d1cdc47e0 |
| permissions | -rw-r--r-- |
|
146
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
# Systemd |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
[](https://forge.puppetlabs.com/camptocamp/systemd) |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
[](https://travis-ci.org/camptocamp/puppet-systemd) |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
## Overview |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
This module declares exec resources that you can use when you change systemd units or configuration files. |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
## Examples |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
### systemctl --daemon-reload |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
```puppet |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
include ::systemd |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
file { '/usr/lib/systemd/system/foo.service': |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
ensure => file, |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
owner => 'root', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
group => 'root', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
mode => '0644', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
source => "puppet:///modules/${module_name}/foo.service", |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
} ~> |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
Exec['systemctl-daemon-reload'] |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
``` |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
### systemd-tmpfiles --create |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
|
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
```puppet |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
include ::systemd |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
file { '/etc/tmpfiles.d/foo.conf': |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
ensure => file, |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
owner => 'root', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
group => 'root', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
mode => '0644', |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
source => "puppet:///modules/${module_name}/foo.conf", |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
} ~> |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
Exec['systemd-tmpfiles-create'] |
|
dc4d1cdc47e0
first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
``` |