Puppet and Chef are both good at managing SSH known_hosts. This is the primary example for Puppet’s Exported Resources, and Chef does it easily via search.
However, neither solution works well in a “masterless” setup. The Chef solution requires a full Chef Server setup - CouchDB, AMQP, and Solr. Puppet isn’t quite as bad - you just need a database to run masterless and still use Exported Resources - like Loggly does. This negates some of the masterless benefits, though, and Loggly lists lots of caveats.
If you happen to be using Capistrano for any part of your project, here is a fast, simple way to manage known_hosts without requiring a database.
1 2 3 4 5 |
|
Usage is simple, just:
1
|
|
or
1
|
|
This was a good fit for us. We were using Capistrano for bootstrapping, and Capistrano Multistage Extension to define environments. I just added this task as part of bootstrapping, so cap production bootstrap
would allow all my production servers to talk with each other - but no one else.