fix: don't overwrite SSH configuration if Chezmoi provides one

This commit is contained in:
Emmanuel BENOîT 2024-12-29 19:03:40 +01:00
parent 42557f201c
commit 8c240c3478
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -597,7 +597,12 @@
dest: /home/vagrant/.local/bin/{{ item.path | basename }}
# Configure SSH for the vagrant user
- name: Check for a Chezmoi-provided SSH configuration
ansible.builtin.stat:
path: /home/vagrant/.ssh/config
register: chezmoi_ssh_config
- name: Configure SSH for the vagrant user
when: not chezmoi_ssh_config.stat.exist
ansible.builtin.copy:
src: files/ssh_config
dest: /home/vagrant/.ssh/config