Bernhard,

Thanks for the update.


-        John T.

From: Bernhard M. Wiedemann [mailto:notifications@github.com]
Sent: Friday, June 07, 2013 1:04 AM
To: crowbar/crowbar
Cc: Terpstra, John
Subject: Re: [crowbar] keep .ssh/authorized_keys entries on install-chef (#1829)


In releases/pebbles/master/extra/bc-provisioner-json.rb:

> @@ -0,0 +1,12 @@

> +#!/usr/bin/env ruby

> +# import pre-existing ssh-keys into provisioner template

> +

> +require 'rubygems'

> +require 'json'

> +

> +keys = File.read('/root/.ssh/authorized_keys') rescue ""

> +

> +databag = JSON.load($stdin)

> +databag['attributes']['provisioner']['access_keys'] += "\n" + keys;

> +

The newline is only in the JSON, not in the resulting authorized_keys file so I'd just leave it as is

—
Reply to this email directly or view it on GitHub<https://github.com/crowbar/crowbar/pull/1829/files#r4583494>.