Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #14005 - add ssh keys support #5834

Merged
merged 1 commit into from Mar 24, 2016
Merged

Conversation

ares
Copy link
Contributor

@ares ares commented Mar 2, 2016

No description provided.

@@ -60,6 +60,8 @@ cat > /etc/puppet/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

<%= snippet('remote_execution_ssh_keys') %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this snippet exist if remote execution is not installed? Will it error if not or gracefully ignore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was moved to community-templates, so it's bundled with Foreman since 1.11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incidentally, I was thinking more that maybe we should move the Katello's templates to community-templates, it'd be more likely to be kept up-to-date. Or abandoning it all together, and relying on Foreman's default kickstart. I forget why we decided not to last time we talked about it.

@jlsherrill
Copy link
Member

@ares ping!

@stbenjam
Copy link
Contributor

stbenjam commented Mar 8, 2016

@ares We also ship a cloud-init template, maybe include it here too: https://github.com/Katello/katello/blob/master/app/views/foreman/unattended/userdata-katello.erb#L17

@ares
Copy link
Contributor Author

ares commented Mar 14, 2016

Sorry, somehow I didn't get emails from this discussion. I've added cloud-init support as well and as @stbenjam says, we can rely on snippet being present since Foreman 11.

@@ -16,6 +16,9 @@ manage_etc_hosts: true
ssh_authorized_keys:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be missing if the user doesn't have a custom ssh key too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stbenjam can you explain about more about this comment? Is this a problem or a general observation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at at the line above

 <% if @host.params['sshkey'] -%>
 ssh_authorized_keys:

This won't render if the user only has remote execution keys, and not this other host parameter, so the YAML will be invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be fixed now, I added check for either sshkey or remote_execution_ssh_keys being present

@ares
Copy link
Contributor Author

ares commented Mar 24, 2016

somehow I'm not getting notifications from this thread, sorry for the delay

@stbenjam
Copy link
Contributor

Thanks @ares! ACK from me

@stbenjam
Copy link
Contributor

Merging, thanks @ares!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants