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
This commit is contained in:
Salt 2020-06-28 08:36:57 -05:00
parent 51869e069a
commit 47977063f4

View File

@ -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