Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit file path inconsistency #488

Closed
litepl opened this issue Aug 30, 2024 · 4 comments · Fixed by #489
Closed

Unit file path inconsistency #488

litepl opened this issue Aug 30, 2024 · 4 comments · Fixed by #489
Assignees

Comments

@litepl
Copy link

litepl commented Aug 30, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8
  • Ruby:
  • Distribution:
  • Module version: 7.1.0

How to reproduce (e.g Puppet code you use)

What are you seeing

Unit file is created in /etc/systemd/system

What behaviour did you expect instead

Unit file is created in /usr/lib/systemd/system

Output log

Any additional information you'd like to impart

In line 73 of manifests/unit_file.pp the default path is set to /etc/systemd/system but README says it should be created in /usr/lib/systemd/system

@kenyon
Copy link
Member

kenyon commented Aug 30, 2024

/etc is the correct place for unit files created like this. The readme should be corrected.

@kenyon kenyon self-assigned this Aug 30, 2024
@kenyon kenyon added the docs Improvements or additions to documentation label Aug 30, 2024
@litepl
Copy link
Author

litepl commented Aug 31, 2024

/etc is the correct place for unit files created like this. The readme should be corrected.

Hmm, I can't agree as putting it in /etc prevents using enable => mask for ex.

@traylenator
Copy link
Contributor

/etc is the correct place for unit files created like this. The readme should be corrected.

Hmm, I can't agree as putting it in /etc prevents using enable => mask for ex.

It's true you can't deploy a custom config and also mask a unit but that's entirely correct that you can't I would say.
A custom config for a masked unit makes no sense.

@litepl
Copy link
Author

litepl commented Sep 6, 2024

It does. Imagine you have some stages in provisioning:

  1. Pre-prod - unit file is created with some data from the template, to be checked before prod. Prevent running manually.
  2. Prod - fully running service
    The most secure option in 1 is to mask the service.
    Another example, when you have to shutdown the service for some nodes only and you want to prevent incidental run.

@bastelfreak bastelfreak added skip-changelog and removed docs Improvements or additions to documentation labels Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants