-
-
Notifications
You must be signed in to change notification settings - Fork 146
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 a network defined resource #30
Conversation
Hi all, I added this as a WIP and I'm currently testing this locally. Could you provide me with feedback? I will add tests later on. |
manifests/network.pp
Outdated
include ::systemd | ||
|
||
if $manage_service { | ||
service{'systemd-networkd': |
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'd split this off in a separate class which you can include. That way you don't need to choose one network where you manage the service.
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.
should we but this into the init.pp?
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 was thinking of a systemd::networkd
class that's included here, but since configuration goes through init that could work as well.
README.md
Outdated
systemd-networkd is able to manage your network configuration. We provide a | ||
defined resource which can write the interface configurations. systemd-networkd | ||
needs to be restarted to apply the configs. The defined resource can do this | ||
for you, besided managing the service itself. |
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.
s/besided/besides/
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.
thx, fixed
03ea9d9
to
fe6c1c2
Compare
manifests/network.pp
Outdated
$notify = undef | ||
} | ||
|
||
file { "${path}/${title}": |
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'd rather use $name
than $title
to allow for a propre namevar mechanism.
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.
It looks like I forgot to submit my review.
manifests/network.pp
Outdated
enabled => true, | ||
} | ||
} | ||
|
||
if $restart_service { |
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.
Do you want to take ``$::systemd::manage_networkd``` into consideration here?
manifests/init.pp
Outdated
@@ -1,7 +1,8 @@ | |||
# -- Class systemd | |||
# This module allows triggering systemd commands once for all modules | |||
class systemd ( | |||
$service_limits = {} | |||
$service_limits = {}, | |||
Boolean $manage_networkd = true, |
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 think this shouldn't default to true since most configurations don't use networkd. Maybe that's why I would take an optional include
Release 1.0.0
No description provided.