-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add support for drop-in files #39
Conversation
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'.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"itself" is one word
@raphink Fixed the noted typos. |
@@ -0,0 +1 @@ | |||
type Systemd::Dropin = Pattern['^.+\.conf$'] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Update README.md
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