feat(ssh): create ssh configuration file

This commit is contained in:
Oliver Davies 2022-04-26 23:40:27 +01:00
parent 201244cd95
commit 173215da34

View file

@ -8,3 +8,11 @@
loop_var: ssh_key_item loop_var: ssh_key_item
no_log: true no_log: true
with_items: "{{ ssh_key | default({}) | dict2items }}" 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