Sha256: a20e963b92107af5a0c56e2fdb64a05f625d5cc84c16437d71e663f756566fe7

Contents?: true

Size: 439 Bytes

Versions: 3

Compression:

Stored size: 439 Bytes

Contents

<%#
  kind: snippet
  name: remote_execution_ssh_keys
%>

<% if !@host.params['remote_execution_ssh_keys'].blank? %>
<% ssh_user = @host.params['remote_execution_ssh_user'] || 'root' %>
<% ssh_path = "~#{ssh_user}/.ssh" %>

mkdir -p <%= ssh_path %>

cat << EOF >> <%= ssh_path %>/authorized_keys
<%= @host.params['remote_execution_ssh_keys'].join("\n") %>
EOF

chmod 700 <%= ssh_path %>
chmod 600 <%= ssh_path %>/authorized_keys
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_remote_execution-0.2.3 app/views/unattended/snippets/_remote_execution_ssh_keys.erb
foreman_remote_execution-0.2.2 app/views/unattended/snippets/_remote_execution_ssh_keys.erb
foreman_remote_execution-0.2.1 app/views/unattended/snippets/_remote_execution_ssh_keys.erb