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 - name: Generate keypair
openssh_keypair: openssh_keypair:
comment: "{{ user_username }}@{{ inventory_hostname }}" comment: "{{ user_username }}@{{ inventory_hostname }}"
path: $HOME/.ssh/id_rsa path: $HOME/.ssh/id_ed25519
mode: "0600" mode: "0600"
register: keypair register: keypair
- name: Register keypair with Gitea - name: Register keypair with Gitea
@ -28,7 +28,7 @@
body: body:
key: "{{ keypair.public_key }}" key: "{{ keypair.public_key }}"
read_only: yes read_only: yes
title: "{{ inventory_hostname }}" title: "{{ inventory_hostname }}-ed25519"
status_code: 201 status_code: 201
when: keypair is changed when: keypair is changed
- name: Configure authorized hosts - name: Configure authorized hosts
@ -43,26 +43,26 @@
- name: Check for dotfile initialization - name: Check for dotfile initialization
stat: path=$HOME/.dotfiles stat: path=$HOME/.dotfiles
register: p 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 - name: Initialize dotfiles
block: 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 - name: Clone bootstrap script
git: git:
accept_hostkey: yes accept_hostkey: yes