Add shared-network configuration#237
Conversation
| Hash[String, Hash] $hosts = {}, | ||
| Variant[Array[String], Optional[String]] $includes = undef, | ||
| String $config_comment = 'dhcpd.conf', | ||
| Optional[String] $shared_network = undef, |
There was a problem hiding this comment.
Is it fine to allow empty strings here, or should we update it?
| Optional[String] $shared_network = undef, | |
| Optional[String[1]] $shared_network = undef, |
There was a problem hiding this comment.
I'd also like to document every new parameter. Ideally we'd have all parameters documented, but if we start with documenting new ones we at least move in that direction.
| $interface = $facts['networking']['interfaces']['#{interface}'] | ||
|
|
||
| class { 'dhcp': | ||
| interfaces => ['#{interface}'], |
There was a problem hiding this comment.
this variable interpolation looks a bit complicated. can't we just do:
| interfaces => ['#{interface}'], | |
| interfaces => [$facts['networking']['interfaces']['eth0']], |
Then you can drop line 10
There was a problem hiding this comment.
I've copied the test from the repo, it use the variable interface during the test
I can replace it in all the manifest with the long facts
ekohl
left a comment
There was a problem hiding this comment.
Shouldn't this be part of subnet or its own define, possibly with its own parameter subnets? The current implementation only allows one definition and will add all subnets to that single shared network but that doesn't have to be true.
On the other hand, that may be too complex to handle.
|
@ekohl I need to digest your comment and think a way to implement it. |
| concat::fragment { "dhcp.conf+${order}-end_${name}.dhcp": | ||
| target => "${dhcp::dhcp_dir}/dhcpd.conf", | ||
| content => "}\n", | ||
| order => "${order}-9end", |
There was a problem hiding this comment.
Probably I need to change 9end in Zend to ensure it is at the end os the of the dhcp::subnet resource
Add shared_network option to use different subnet on the same layer2 like multi subnet network or relay dhcp redirection
fixes #236