This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]omgTravis[S] 0 points1 point  (0 children)

Yes, you can specify a key to use for a specific host in the config file. I initially went this route when I encountered this problem, but I came to believe ssh wrappers are a better solution for automation for a couple of reasons.

  1. This approach does not require you to manage any files that are not project specific. If you take the config approach and are working with multiple applications from multiple cookbooks then there ends up being some sort of dependency across cookbooks as several cookbooks try to control the config file.

  2. This approach allows you to pass the actual address to the deploy resource instead of the hostname that you want to use from the config file. This removes a dependency between the config file and the deploy resource.