-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from anarcat/template-docs
docs: describe how to deploy systemd templates
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,22 @@ systemd::unit_file { 'foo.service': | |
} | ||
``` | ||
|
||
If you're using "template" units (those with a `@` in it), you can | ||
simply enable an instance of the template with a `service` resource. This, for example, will | ||
enable the `foo@bar` service unit, based on the `foo@` template: | ||
|
||
```puppet | ||
systemd::unit_file { '[email protected]': | ||
content => file("${module_name}/[email protected]"), | ||
enable => false, | ||
active => false, | ||
} | ||
service { '[email protected]': | ||
ensure => true, | ||
enable => true, | ||
} | ||
``` | ||
|
||
### unit files from parameters | ||
|
||
Create a unit file from parameters | ||
|