Skip to content

Commit fcdc5c0

Browse files
committed
docs: describe how to deploy systemd templates
I've bent over backwards to make this work, while the solution is much simpler than I thought it was. Closes: voxpupuli#510 Replaces: voxpupuli#511
1 parent 6429d6e commit fcdc5c0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ systemd::unit_file { 'foo.service':
5858
}
5959
```
6060

61+
If you're using "template" units (those with a `@` in it), you can
62+
simply enable it with a `service` resource. This, for example, will
63+
enable the `foo@bar` service unit, based on the `foo@` template:
64+
65+
```puppet
66+
systemd::unit_file { 'foo@.service':
67+
content => file("${module_name}/foo@.service"),
68+
enable => false,
69+
active => false,
70+
}
71+
service { 'foo@bar.service':
72+
ensure => true,
73+
enable => true,
74+
}
75+
```
76+
6177
### unit files from parameters
6278

6379
Create a unit file from parameters

0 commit comments

Comments
 (0)