From beadeaa0f8be2d1de0fe2fad19c9245def8e0ae8 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 26 Apr 2022 20:53:59 +0100 Subject: [PATCH] feat(role): add ssh --- group_vars/all | 1 + roles/ssh/tasks/main.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/ssh/tasks/main.yaml diff --git a/group_vars/all b/group_vars/all index cba6239..0e5fed6 100644 --- a/group_vars/all +++ b/group_vars/all @@ -1,4 +1,5 @@ default_roles: + - ssh - alacritty - ctop - dconf diff --git a/roles/ssh/tasks/main.yaml b/roles/ssh/tasks/main.yaml new file mode 100644 index 0000000..1b3ab5f --- /dev/null +++ b/roles/ssh/tasks/main.yaml @@ -0,0 +1,10 @@ +--- +- name: Copy SSH keys + copy: + content: "{{ ssh_key_item.value }}" + dest: "{{ ansible_user_dir }}/.ssh/{{ ssh_key_item.key }}" + mode: 0400 + loop_control: + loop_var: ssh_key_item + no_log: true + with_items: "{{ ssh_key | default({}) | dict2items }}"