Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

fix authorized_keys in create_users snippet #392

Merged
merged 1 commit into from
Jun 2, 2017
Merged

fix authorized_keys in create_users snippet #392

merged 1 commit into from
Jun 2, 2017

Conversation

zeromind
Copy link

use .ssh_key instead of .key, as we already use .type
and .key contains both .type and .ssh_key

use .ssh_key instead of .key, as we already use .type
and .key contains both .type and .ssh_key
@mmoll
Copy link
Contributor

mmoll commented Jun 1, 2017

@ekohl could you take a look here?

@ekohl
Copy link
Member

ekohl commented Jun 1, 2017

I think https://github.com/theforeman/foreman/blob/cf4687537819e1862d530049a7f29d0e86ba16fe/app/models/ssh_key.rb#L47-L53 is the relevant part and that would mean this shouldn't be needed. @timogoebel?

@timogoebel
Copy link
Member

@ekohl: Iirc to_export_hash is only relevant for the ENC data. The template code uses the code directly.

To get the correct string, either use "#{key.type} #{key.ssh_key} #{key.comment}" or "#{key. to_export}".

@ekohl
Copy link
Member

ekohl commented Jun 2, 2017

Right, so this change is correct.

@ekohl ekohl merged commit 9f46ec1 into theforeman:develop Jun 2, 2017
@ekohl
Copy link
Member

ekohl commented Jun 2, 2017

Thanks @zeromind!

@ares
Copy link
Member

ares commented Jun 14, 2017

This should probably be cherry-picked to 1.15-stable and synced to Foreman 1.15.2, otherwise ssh keys can't be deployed.

@ares
Copy link
Member

ares commented Jun 14, 2017

sorry for the noise, it was already CPed to 1.15-stable as 58de81d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants