fix: only ignore SSH host keys for local VMs
This commit is contained in:
parent
8c240c3478
commit
c35a07f9a8
3 changed files with 7 additions and 6 deletions
|
@ -1,3 +0,0 @@
|
||||||
StrictHostKeyChecking no
|
|
||||||
UserKnownHostsFile /dev/null
|
|
||||||
LogLevel ERROR
|
|
4
ansible/files/ssh_config.j2
Normal file
4
ansible/files/ssh_config.j2
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
LogLevel ERROR
|
||||||
|
Host *.{{ domain_name }}
|
||||||
|
StrictHostKeyChecking no
|
||||||
|
UserKnownHostsFile /dev/null
|
|
@ -602,9 +602,9 @@
|
||||||
path: /home/vagrant/.ssh/config
|
path: /home/vagrant/.ssh/config
|
||||||
register: chezmoi_ssh_config
|
register: chezmoi_ssh_config
|
||||||
- name: Configure SSH for the vagrant user
|
- name: Configure SSH for the vagrant user
|
||||||
when: not chezmoi_ssh_config.stat.exist
|
when: not chezmoi_ssh_config.stat.exists
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: files/ssh_config
|
src: files/ssh_config.j2
|
||||||
dest: /home/vagrant/.ssh/config
|
dest: /home/vagrant/.ssh/config
|
||||||
|
|
||||||
# Configure Vim
|
# Configure Vim
|
||||||
|
|
Loading…
Add table
Reference in a new issue