Skip to content

Conversation

MaxBed4d
Copy link

No description provided.

@MaxBed4d MaxBed4d requested a review from sd109 October 15, 2024 15:03
@MaxBed4d MaxBed4d requested a review from a team as a code owner October 15, 2024 15:03
@MaxBed4d MaxBed4d removed the request for review from a team October 15, 2024 15:03
@@ -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.
Copy link
Member

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?

Copy link
Collaborator

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.

tasks:
- name: Copy ssh public key
ansible.builtin.copy:
src: /var/lib/rocky/conch/ssh_signing_key.pub
Copy link
Collaborator

Choose a reason for hiding this comment

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

How's this getting configured? You just created this by hand right?

# NOTE: Change the src for the `ssh_signing_key.pub` to be your corresponding directory.

- hosts: login
gather_facts: true
Copy link
Collaborator

Choose a reason for hiding this comment

The 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).

@@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

remote_src: true

- name: Ensure CA Certs are accepted
ansible.builtin.lineinfile:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need a regexp: line to make it idempotent? E.g. if its already there, but commented out?

- name: Restart SSH service
ansible.builtin.systemd:
name: sshd
state: restarted
Copy link
Collaborator

Choose a reason for hiding this comment

The 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


# NOTE: Change the src for the `ssh_signing_key.pub` to be your corresponding directory.

- hosts: login
Copy link
Collaborator

Choose a reason for hiding this comment

The 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 ...

@sd109
Copy link
Member

sd109 commented Oct 17, 2024

As discussed elsewhere, let's just merge this as-is for now since it's targeting the Waldur proof of concept branch. We can worry about polishing things later if needed.

@sd109 sd109 merged commit b39e834 into poc/waldur Oct 17, 2024
1 check failed
@sd109 sd109 deleted the waldur-sshd-auto-config branch October 17, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants