Skip to content

Commit

Permalink
update changelog, fix tests, and finish adding support for non-standa…
Browse files Browse the repository at this point in the history
…rd ports
  • Loading branch information
tejaycar committed Feb 20, 2017
1 parent f1287d9 commit 5ef8855
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* updates for rubocop errors
* Better handling for custom ssh ports - thanks @stissot
* handle more than one option in authorized-hosts correctly - thanks @chazzly and @rongshen-daqri

* Handle hashed vs non-hashed existing keys correctly - thanks @balous

## 0.10.16
* #58 fix deprication warning in default value of provider (thanks to @CloCkWeRX)
Expand Down
4 changes: 2 additions & 2 deletions providers/known_hosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def load_current_resource
cmd =
if new_resource.key.nil?
"ssh-keygen #{new_resource.hashed ? '-H ' : ''} -F #{Shellwords.escape(matching_host)} "\
"-f #{new_resource.path} | grep 'Host #{matching_host} found'"
"-f #{new_resource.path} | grep -F 'Host #{matching_host} found'"
else
"cat '#{new_resource.path}' | grep '#{new_resource.key}'"
"grep -F '#{new_resource.key}' '#{new_resource.path}'"
end

search = Mixlib::ShellOut.new(cmd)
Expand Down
1 change: 1 addition & 0 deletions test/cookbooks/ssh_test/recipes/known_hosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
(1..3).step do |n|
ssh_known_hosts "altssh.bitbucket.org converge #{n}" do
host 'altssh.bitbucket.org'
hashed true
port 443
user 'root'
key ::TestData.bitbucket_altssh_key
Expand Down

0 comments on commit 5ef8855

Please sign in to comment.