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
Conversation
@@ -60,6 +60,8 @@ cat > /etc/puppet/puppet.conf << EOF | |||
<%= snippet 'puppet.conf' %> | |||
EOF | |||
|
|||
<%= snippet('remote_execution_ssh_keys') %> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
@ares ping! |
@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 |
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
somehow I'm not getting notifications from this thread, sorry for the delay |
Thanks @ares! ACK from me |
Merging, thanks @ares! |
No description provided.