-
Notifications
You must be signed in to change notification settings - Fork 2
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
Generate and install SSH key #2
base: master
Are you sure you want to change the base?
Conversation
@@ -9,6 +9,11 @@ | |||
name: rubygem-smart_proxy_ansible | |||
state: latest | |||
|
|||
- name: 'Install smart_proxy_ansible' | |||
yum: |
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.
Not required, but I did bad using yum earlier and not package
state: link | ||
|
||
- name: Generate /etc/ssh/ RSA host key | ||
command: 'ssh-keygen -q -t rsa -b 4096 -f {{ foreman_proxy_remote_execution_ssh_dir }}/{{ foreman_proxy_remote_execution_ssh_keypair_name }} -C "Foreman Remote execuction key" -N ""' |
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.
Could switch to Ansible module -- https://docs.ansible.com/ansible/devel/modules/openssh_keypair_module.html
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.
Would also let you drop the next two file tasks
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.
Welp, I see further down below you already had that thought.
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.
Maybe move it before these command so thats more obvious reading top-bottom
src: "{{ foreman_proxy_remote_execution_ssh_dir }}/{{ foreman_proxy_remote_execution_ssh_keypair_name }}" | ||
register: foreman_rex_ssh_private_key | ||
|
||
|
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.
Silly nitpick extra line here.
The generation of the keys and the deployment of the keys seem separate to me. Is there a reason I am missing for the two being coupled? Can I as a user supply my own set of ssh keys (I assume yes given the pattern you copied). |
@ehelms I tried to follow the same pattern. With this, I'm able to run REX jobs against localhost right away. The last issue is that the proxy was not registered to default org,loc but that's not related to this change.