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

Adding a variable to allow the declaration of the next-server IP #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/host.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# == Define: dhcp::host
#
# @param parameters used for setting different parameters like e.g next-server declarition, filename for the host
define dhcp::host (
Optional[Stdlib::IP::Address] $ip = undef,
Dhcp::Mac $mac,
String $ddns_hostname = $name,
Hash $options = {},
Hash $parameters = {},
astritsinani marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Would this be a better suggestion?

Suggested change
Hash $parameters = {},
Hash[String[1], Any] $parameters = {},

Rather than Any it could also be String[1] but I don't know if you also want to deal with Integer.

String $comment = '',
Boolean $ignored = false,
Optional[Integer] $default_lease_time = undef,
Expand Down
3 changes: 3 additions & 0 deletions templates/dhcpd.host.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ host <%= @host %> {
option <%= option %> <%= @options[option] %>;
<% end -%>
<% end -%>
<% @parameters.sort.each do |param, value| -%>
<%= param %> <%= value %>;
<% end -%>
<% if not @on_commit.empty? -%>
on commit {
<% @on_commit.each do |statement| -%>
Expand Down