-
Notifications
You must be signed in to change notification settings - Fork 35
Ansible playbook to configure sshd for Conch CA certs. #454
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# An ansible playbook to configure the SSHD configuration to enable CA cert auth for SSH. | ||
# Remember to export CI_CLOUD if it isn't part of your environment's variables. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI_CLOUD is only required if you're using app creds. Playbooks aren't the place to document the wriggles of authing to openstack TBH. |
||
|
||
# NOTE: Change the src for the `ssh_signing_key.pub` to be your corresponding directory. | ||
|
||
- hosts: login | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally we'd have a group for the feature, but I'm not clear on which feature this actually belongs to. I suggested login to @MaxBed4d understanding this was a one-off play running against an already-deployed cluster. But that wouldn't be a PR ... |
||
gather_facts: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't look like you need facts, so I'd turn it off or at least leave it out (which will default to on, but at least you're not documenting that you need something you don't). |
||
become: true | ||
tasks: | ||
- name: Copy ssh public key | ||
ansible.builtin.copy: | ||
src: /var/lib/rocky/conch/ssh_signing_key.pub | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How's this getting configured? You just created this by hand right? |
||
dest: /etc/ssh/ca_user_key.pub | ||
owner: root | ||
group: root | ||
mode: '0644' | ||
remote_src: true | ||
|
||
- name: Ensure CA Certs are accepted | ||
ansible.builtin.lineinfile: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need a |
||
line: 'TrustedUserCAKeys /etc/ssh/ca_user_key.pub' | ||
dest: /etc/ssh/sshd_config | ||
|
||
- name: Restart SSH service | ||
ansible.builtin.systemd: | ||
name: sshd | ||
state: restarted | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Depending on how this should actually be integrated, this might need gating somehow |
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.
Why is this needed? How are you running this playbook?
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.
Yeah we need to talk about where this is included in site.yml, there's a bigger job/discussion here than just adding a playbook I think.