From 8c240c34780557a2bcbf20af081de8930ce2ccb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20BENO=C3=8ET?= Date: Sun, 29 Dec 2024 19:03:40 +0100 Subject: [PATCH] fix: don't overwrite SSH configuration if Chezmoi provides one --- ansible/provision.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/provision.yml b/ansible/provision.yml index eb1a8ad..6f12a3a 100644 --- a/ansible/provision.yml +++ b/ansible/provision.yml @@ -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