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

Interface configuration #88

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Interface configuration #88

wants to merge 11 commits into from

Conversation

simher
Copy link

@simher simher commented Jan 14, 2016

Hi!

I have added some code to be able to use the interface directive in the ntp.conf.

Does it look Ok to you?

Best regards,
Simon

@ghoneycutt
Copy link
Owner

The docs read that the format should be interface <action> <address> whereas your code only has one argument to interface. Since there can be multiple interface lines, perhaps we should use a hash.

Example:

$interfaces = {
  'ignore' => 'ipv6',
  'listen' => '127.0.0.1',
}

https://www.mankier.com/5/ntp_misc

@@ -40,6 +40,7 @@
$disable_monitor = true,
$sysconfig_path = 'USE_DEFAULTS',
$sysconfig_options = 'USE_DEFAULTS',
$interface = 'UNSET',
Copy link
Owner

Choose a reason for hiding this comment

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

instead of UNSET we could use {}

@ghoneycutt
Copy link
Owner

What do you think? We also need spec tests, but I'm happy to help with those.

@simher
Copy link
Author

simher commented Jan 15, 2016

Yes I know, In hiera I have configured it the following way,

ntp::interface:
-ignore wildcard
-listen 10.132.172.85/20

And I don't really understand your example. Should It look like this then?

ntp::interface_ignore: 'wildcard'
ntp::interface_listen: '10.132.172.85/20'
ntp::interface_drop: 'all'

Seems just more of an annoyance and less readable.

Or am I missing something?

Hannes Doyle and others added 2 commits September 27, 2016 13:58

interface
---------------
Adds 'interface' line - interface configuration, see man ntp_misc
Copy link
Owner

Choose a reason for hiding this comment

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

Please not that this must be an array of strings and give an example.

@@ -32,7 +32,7 @@ filegen clockstats file clockstats type day enable
# pool: <http://www.pool.ntp.org/join.html>

<% @servers.each do |server| -%>
server <%= server %><% if @server_options != 'UNSET' %> <%= @server_options %><% end %>
server <%= server %><% if @server_options != 'UNSET' %> <% @server_options.each do |option| -%><%= option %><% end -%><% end %>
Copy link
Owner

Choose a reason for hiding this comment

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

This is separate from adding the interface parameter and should be in its own pull request.

I noticed you are using your master branch instead of creating a topic branch. Suggest creating a topic branch so this can be separate from the interface pull request (PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants