Skip to content

Commit

Permalink
docs: describe how to deploy systemd templates
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anarcat committed Jan 16, 2025
1 parent 6429d6e commit fcdc5c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ systemd::unit_file { 'foo.service':
}
```

If you're using "template" units (those with a `@` in it), you can
simply enable it 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
Expand Down

0 comments on commit fcdc5c0

Please sign in to comment.