Skip to content

Commit

Permalink
Merge pull request #512 from anarcat/template-docs
Browse files Browse the repository at this point in the history
docs: describe how to deploy systemd templates
  • Loading branch information
anarcat authored Jan 17, 2025
2 parents 6429d6e + eafea56 commit c362496
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 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
Expand Down

0 comments on commit c362496

Please sign in to comment.