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

add key distribution #314

Merged
merged 7 commits into from
Mar 9, 2016
Merged

add key distribution #314

merged 7 commits into from
Mar 9, 2016

Conversation

n0wi
Copy link
Contributor

@n0wi n0wi commented Feb 26, 2016

I need to distribute keys to our nodes. And this works for me.

@@ -178,7 +176,7 @@ Disables the monitoring facility in NTP. Valid options: 'true' or 'false'. Defau

Specifies an NTP driftfile. Valid options: string containing an absolute path. Default value: '/var/lib/ntp/drift' (except on AIX and Solaris)

#### `fudge`
Copy link
Contributor

Choose a reason for hiding this comment

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

This space is supposed to be there, actually http://spec.commonmark.org/0.24/#atx-headings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. thank you for the link. I'll revert the changes.

@hunner
Copy link
Contributor

hunner commented Feb 26, 2016

Looks good! Could you update this acceptance test to use the new parameter instead of shell()?

describe 'keys' do
it 'enables the key parameters' do
pp = <<-EOS
class { 'ntp':
keys_enable => true,
keys_file => '/etc/ntp/keys',
keys_controlkey => '15',
keys_requestkey => '1',
keys_trusted => [ '1', '2' ],
}
EOS
# Rely on a shell command instead of a file{} here to avoid loops
# within puppet when it tries to manage /etc/ntp/keys before /etc/ntp.
shell("mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys")
apply_manifest(pp, :catch_failures => true)
end

@@ -210,14 +212,20 @@ Specifies the complete path and location of the MD5 key file containing the keys

Specifies the key identifier to use with the ntpdc utility program. Valid options: value in the range of 1 to 65,534 inclusive. Default value: ' '

#### `keys_trusted`:
####`keys_template`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you really need this parameter? We don't usually add parameters to change the template used, preferring that PRs be sent to expand the existing templates. So would it work for you to not add this parameter?

hunner added a commit that referenced this pull request Mar 9, 2016
@hunner hunner merged commit 8a255a7 into puppetlabs:master Mar 9, 2016
hunner added a commit to hunner/puppetlabs-ntp that referenced this pull request Mar 11, 2016
The keys_file defaults to /etc/ntp/keys on many platforms, but the
packages do not create that directory. There is a parameter, config_dir
that can be used to manage this directory, though in our acceptance
tests there was a line that did an mkdir of this directory which was
removed in PR puppetlabs#314 and covered up the fact that the module would not
work by default on many platforms. This should get the tests working
again, and update the debian/ubuntu defaults to their documented
defaults.

Both Debian and Ubuntu actually specify /etc/ntp.keys as the default.
And freebsd, sles, opensuse, and archlinux.

RedHat is the only OS with /etc/ntp/keys as the true default, against
the ntpd standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants