13 lines
393 B
YAML
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
|