2022-05-31 04:36:55 +00:00
|
|
|
---
|
|
|
|
- name: Setup git config
|
|
|
|
copy:
|
|
|
|
src: templates/.gitconfig
|
|
|
|
dest: /root/.gitconfig
|
|
|
|
owner: root
|
|
|
|
mode: u=rw,g=,o=
|
|
|
|
|
2022-05-31 05:13:46 +00:00
|
|
|
- name: Scan for SSH host keys
|
|
|
|
command: ssh-keyscan github.com 2>/dev/null
|
2022-05-31 04:36:55 +00:00
|
|
|
register: ssh_scan
|
|
|
|
|
2022-05-31 05:13:46 +00:00
|
|
|
- name: Update known_hosts
|
|
|
|
copy:
|
|
|
|
content: "{{ ssh_scan.stdout_lines|join('\n') }}"
|
|
|
|
dest: /root/.ssh/known_hosts
|
|
|
|
owner: root
|
|
|
|
mode: u=rw,g=,o=
|
2022-05-31 18:48:01 +00:00
|
|
|
force: no # if we already have a known_hosts file, ignore!
|
2022-05-31 04:36:55 +00:00
|
|
|
|
2022-05-31 05:13:46 +00:00
|
|
|
- name: Install ssh priv key
|
|
|
|
copy:
|
2022-05-31 04:36:55 +00:00
|
|
|
src: secrets/id_ed25519
|
2022-05-31 04:39:32 +00:00
|
|
|
dest: /root/.ssh/id_ed25519
|
2022-05-31 05:13:46 +00:00
|
|
|
mode: u=rw,g=,o=
|
2022-05-31 04:39:32 +00:00
|
|
|
|
2022-05-31 05:13:46 +00:00
|
|
|
- name: Install ssh pub key
|
|
|
|
copy:
|
2022-05-31 04:39:32 +00:00
|
|
|
src: secrets/id_ed25519.pub
|
|
|
|
dest: /root/.ssh/id_ed25519.pub
|