From 4a3995ba294d71e2a841a8c014fbe6f40d48f187 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 20 Feb 2023 09:32:47 +0100 Subject: [PATCH] add ssh config --- README.md | 1 + roles/system/files/ssh_config | 21 +++++++++++++++++++++ roles/system/tasks/main.yml | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 roles/system/files/ssh_config diff --git a/README.md b/README.md index 5420466..3154529 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ My current setup is [Regolith OS](https://regolith-desktop.com/) which is basica - thunderbird config - some kind of tag setup with: bootstrap, update, etc. - i3 app shortcuts +- firefox config? extensions? host own synchronizer? Would like Ansible Vault to check in keypair for syncthing. However, then I would need a password to unlock the vault. diff --git a/roles/system/files/ssh_config b/roles/system/files/ssh_config new file mode 100644 index 0000000..24ccf45 --- /dev/null +++ b/roles/system/files/ssh_config @@ -0,0 +1,21 @@ +Host brussels + HostName brussels.studlab.os3.nl + User pkunis + +Host github.com + HostName github.com + User pizzapim + IdentitiesOnly yes + +Host max + HostName max.lan + User root + +Host lewis + HostName lewis.lan + User root + +Host forgejo + HostName git.pim.kunis.nl + Port 56287 + User git diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 57479c5..76947bd 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -51,3 +51,13 @@ apt: update_cache: true when: apt_repository.changed +- name: Create ssh config directory + file: + path: ~/.ssh + state: directory + mode: 0700 +- name: Copy ssh config + copy: + src: "{{ role_path }}/files/ssh_config" + dest: ~/.ssh/config + mode: 0600