Fix SSH config

This commit is contained in:
Jeroen Vermeulen 2023-10-23 14:38:20 +02:00
parent 883ef18d44
commit e8db339472
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

4
os.yml
View File

@ -17,7 +17,7 @@
roles:
- role: os_debian
tags:
- debian
- os_debian
- name: Ubuntu
hosts:
@ -25,4 +25,4 @@
roles:
- role: os_ubuntu
tags:
- ubuntu
- os_ubuntu

View File

@ -3,10 +3,11 @@
delegate_to: localhost
ansible.builtin.stat:
path: ~/.ssh/config.d
follow: true
register: _stat_ssh_configd
- 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
ansible.builtin.copy:
dest: ~/.ssh/config.d/{{ inventory_hostname }}.conf