snel.kubernetes-cluster/roles/os_debian/tasks/local-ssh.yml

13 lines
393 B
YAML

---
- name: Add SSH config on ansible host
delegate_to: localhost
ansible.builtin.copy:
dest: ~/.ssh/config.d/{{ inventory_hostname }}.conf
content: |
Host {{ inventory_hostname }} {{ inventory_hostname.split(".")[0] }}
Hostname {{ ansible_ssh_hostname | default(inventory_hostname) }}
Port 22
User root
ForwardAgent yes
mode: u=rw,go=r