-
-
Notifications
You must be signed in to change notification settings - Fork 143
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 manage_network to manage networks in code #340
base: master
Are you sure you want to change the base?
Conversation
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.
Appreciate it is WIP still.
# @param address_entry key value pairs for [Address] section of the unit file | ||
# | ||
define systemd::manage_network ( | ||
Enum['file', 'absent'] $ensure = 'file', |
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.
The rest of module uses present
and absent
. The fact it a file is a hidden detail.
mode => $mode, | ||
show_diff => $show_diff, | ||
restart_service => $restart_service, | ||
content => epp('systemd/network.epp', { |
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.
Rather than a new template the existing unit.epp
could be extended to just support [Match]
, [Network]
and [Address]
.
You would get manage_unit
and manage_dropin
of a network for free in the process. manage_unit
.
manage_unit
.
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.
but wouldn't it get to overloaded, with dropin, units and networks? the initial 3 *_entry are only a subset, netword offers a lot more. so i thought better have it separated. otherwise you will never get a PR done if you have to check alle the influence you change could have?
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.
Easier to deal with the interaction in a common layer.
Template does need refactoring to loop over the section rather than enumerate them but that just strengthens case for one template.
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 also can add my stuff there, if this is whats needed to merge this in the end. i'm personally just not a big fand off such über-templates.
@rwaffen are you still working on this ? |
add manage_network so that one can define networks in code like one can do it with unit_files and manage_unit.
missing:
early tests with code like this seem to work