Fix SSH config
This commit is contained in:
parent
883ef18d44
commit
e8db339472
4
os.yml
4
os.yml
|
@ -17,7 +17,7 @@
|
||||||
roles:
|
roles:
|
||||||
- role: os_debian
|
- role: os_debian
|
||||||
tags:
|
tags:
|
||||||
- debian
|
- os_debian
|
||||||
|
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
hosts:
|
hosts:
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
roles:
|
roles:
|
||||||
- role: os_ubuntu
|
- role: os_ubuntu
|
||||||
tags:
|
tags:
|
||||||
- ubuntu
|
- os_ubuntu
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: ~/.ssh/config.d
|
path: ~/.ssh/config.d
|
||||||
|
follow: true
|
||||||
register: _stat_ssh_configd
|
register: _stat_ssh_configd
|
||||||
|
|
||||||
- name: Add SSH config on ansible host
|
- name: Add SSH config on ansible host
|
||||||
when: _stat_ssh_configd.stat.isdir
|
when: "_stat_ssh_configd.stat.exists and _stat_ssh_configd.stat.isdir"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: ~/.ssh/config.d/{{ inventory_hostname }}.conf
|
dest: ~/.ssh/config.d/{{ inventory_hostname }}.conf
|
||||||
|
|
Loading…
Reference in New Issue