From 47977063f45588f2e65c46207b19d423847a44b2 Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 28 Jun 2020 08:36:57 -0500 Subject: [PATCH] Fix old substitutes, also how about we generate new fancy keys instead of old RSA ones Also because this is clobbering my old keys help me --- roles/user/tasks/main.yml | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml index 391fbdf..15dd225 100644 --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -14,7 +14,7 @@ - name: Generate keypair openssh_keypair: comment: "{{ user_username }}@{{ inventory_hostname }}" - path: $HOME/.ssh/id_rsa + path: $HOME/.ssh/id_ed25519 mode: "0600" register: keypair - name: Register keypair with Gitea @@ -28,7 +28,7 @@ body: key: "{{ keypair.public_key }}" read_only: yes - title: "{{ inventory_hostname }}" + title: "{{ inventory_hostname }}-ed25519" status_code: 201 when: keypair is changed - name: Configure authorized hosts @@ -43,26 +43,26 @@ - name: Check for dotfile initialization stat: path=$HOME/.dotfiles register: p + - name: Configure git SSH substitute for GitHub + git_config: + name: url."https://github.com/".insteadOf + value: "git@github.com:" + scope: global + state: absent + - name: Configure git SSH substitute for GitLab + git_config: + name: url."https://gitlab.com/".insteadOf + value: "git@gitlab.com:" + scope: global + state: absent + - name: Configure git SSH substitute for 9iron + git_config: + name: url."https://git.9iron.club/".insteadOf + value: "git@git.9iron.club:" + scope: global + state: absent - name: Initialize dotfiles block: - - name: Configure git SSH substitute for GitHub - git_config: - name: url."https://github.com/".insteadOf - value: "git@github.com:" - scope: global - state: absent - - name: Configure git SSH substitute for GitLab - git_config: - name: url."https://gitlab.com/".insteadOf - value: "git@gitlab.com:" - scope: global - state: absent - - name: Configure git SSH substitute for 9iron - git_config: - name: url."https://git.9iron.club/".insteadOf - value: "git@git.9iron.club:" - scope: global - state: absent - name: Clone bootstrap script git: accept_hostkey: yes