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

make sure we iterate predictable over the hash #11

Merged
merged 4 commits into from
Nov 7, 2016
Merged
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
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_VERSION=3.7.4
env: PUPPET_VERSION=3.8.7
- rvm: 2.0.0
env: PUPPET_VERSION=3.7.4
env: PUPPET_VERSION=3.8.7
- rvm: 2.0.0
env: PUPPET_VERSION=3.7.4 FUTURE_PARSER="yes"
env: PUPPET_VERSION=3.8.7 FUTURE_PARSER="yes"
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ gem 'puppet-lint', '>=0.3.2'
gem 'puppetlabs_spec_helper', '>=0.2.0'
gem 'rake', '>=0.9.2.2'
gem 'librarian-puppet', '>=1.0.0'

if RUBY_VERSION.to_i < 2.0
gem 'json_pure', '< 2.0.2'
end
7 changes: 6 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@
}.to raise_error(/Setting \$config_keys_manage false and \$chrony_password at same time in chrony is not possible\./) }
end
context 'on any other system' do
let(:facts){
{
:osfamily => 'Debian',
}
}
it { expect {
should compile
}.to raise_error(/The chrony module is not supported on an based system\./) }
}.to raise_error(/The chrony module is not supported on an Debian based system\./) }
end
end

4 changes: 2 additions & 2 deletions templates/chrony.conf.archlinux.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
! server ntp0.your-isp.com
! server ntp1.your-isp.com
! server ntp.public-server.org
<% if @servers.is_a?(Hash) then @servers.each do |server, options| -%>
server <%= server %> <%= options.join(' ') %>
<% if @servers.is_a?(Hash) then @servers.keys.sort.each do |server| -%>
server <%= server %> <%= @servers[server].join(' ') %>
<% end else Array(@servers).each do |server| -%>
server <%= server %> iburst
<% end end -%>
Expand Down
4 changes: 2 additions & 2 deletions templates/chrony.conf.redhat.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
<% if @servers.is_a?(Hash) then @servers.each do |server, options| -%>
server <%= server %> <%= options.join(' ') %>
<% if @servers.is_a?(Hash) then @servers.keys.sort.each do |server| -%>
server <%= server %> <%= @servers[server].join(' ') %>
<% end else Array(@servers).each do |server| -%>
server <%= server %> iburst
<% end end -%>
Expand Down