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

Add support for drop-in files #39

Merged
merged 5 commits into from
Aug 17, 2017

Conversation

countsudoku
Copy link
Contributor

Hi,

This solves #15. I know, there is another pull request, which manage drop-in files. But my solution is able to mange multiple drop-in files, even when the service file isn't managed by the ::systemd module. I've also updated the spec tests and the README.

Regards

The drop-in directory must not created more then once, even if multiple
drop-in files per unit are created. Also drop-in files for units, which are
not deployed via puppet, should be supported. The only solution is to use
ensure_resource from puppetlabs/stdlib. Everything else is the same as for a
unit_file, except the name of the drop-in file, which has to end with '.conf'.
Copy link
Member

@raphink raphink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM besides the typos

README.md Outdated
@@ -36,6 +36,39 @@ file { '/usr/lib/systemd/system/foo.service':
~> Class['systemd::systemctl::daemon_reload']
```

### drop-in files

Drop-in files are used to add or alter settings of a unit without modify the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: modifying

README.md Outdated
### drop-in files

Drop-in files are used to add or alter settings of a unit without modify the
unit it self. As for the unit files, the module can handle the file and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"itself" is one word

@trevor-vaughan
Copy link
Contributor

@raphink Fixed the noted typos.

@@ -0,0 +1 @@
type Systemd::Dropin = Pattern['^.+\.conf$']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it should check if there's no slashes in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add a check if there is no slash in there. I tried to use the same kind of pattern definition as for Systemd::Unit and there isn't a check for slashes.

@raphink raphink merged commit 0e4281a into voxpupuli:master Aug 17, 2017
@jarro2783 jarro2783 mentioned this pull request Sep 8, 2017
@countsudoku countsudoku deleted the feature/generic_drop-in_files branch November 16, 2018 16:08
@raphink raphink added the enhancement New feature or request label Jan 7, 2020
op-ct pushed a commit to op-ct/puppet-systemd that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants