Skip to content

Commit

Permalink
sort hashes to prevent shuffling and restarting ssh unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
CyBeRoni committed Mar 2, 2014
1 parent 3547fdc commit 883f15b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions templates/ssh_config.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# File managed by Puppet

<%- scope.lookupvar('ssh::client::merged_options').each do |k, v| -%>
<%- scope.lookupvar('ssh::client::merged_options').sort.each do |k, v| -%>
<%- if v.is_a?(Hash) -%>
<%= k %>
<%- v.each do |key, value| -%>
<%- v.sort.each do |key, value| -%>
<%- if value.is_a?(Array) -%>
<%- value.each do |a| -%>
<%= key %> <%= a %>
Expand Down
4 changes: 2 additions & 2 deletions templates/sshd_config.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# File is managed by Puppet

<%- scope.lookupvar('ssh::server::merged_options').each do |k, v| -%>
<%- scope.lookupvar('ssh::server::merged_options').sort.each do |k, v| -%>
<%- if v.is_a?(Hash) -%>
<%= k %>
<%- v.each do |key, value| -%>
<%- v.sort.each do |key, value| -%>
<%- if value.is_a?(Array) -%>
<%- value.each do |a| -%>
<%= key %> <%= a %>
Expand Down

0 comments on commit 883f15b

Please sign in to comment.