dotfiles/roles/ssh/tasks/main.yaml

19 lines
469 B
YAML
Raw Normal View History

2022-04-26 19:53:59 +00:00
---
- 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 }}"
- name: Create SSH configuration file
ansible.builtin.copy:
content: "{{ ssh_config }}"
dest: "{{ ansible_user_dir }}/.ssh/config"
mode: 0400
no_log: true
when: ssh_config is defined