SSH: Add global known hosts
This commit is contained in:
parent
7c1d978654
commit
03c99a7b8c
6 changed files with 53 additions and 10 deletions
23
tasks/sshsettings.yml
Normal file
23
tasks/sshsettings.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
# Common/SSH Setting: Universal SSH client settings
|
||||
|
||||
- name: Sshsettings - Add global config
|
||||
become: true
|
||||
tags: common_ssh
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/ssh/ssh_config.d/global-known-hosts
|
||||
mode: "0644"
|
||||
owner: root
|
||||
content: |
|
||||
Host *
|
||||
GlobalKnownHostsFile {{ ssh_client_global_known_hosts_file }}
|
||||
VerifyHostKeyDNS yes
|
||||
|
||||
- name: Sshsettings - Add global known_hosts
|
||||
become: true
|
||||
tags: common_ssh
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/ssh_known_hosts.j2"
|
||||
dest: "{{ ssh_client_global_known_hosts_file }}"
|
||||
mode: "0644"
|
||||
owner: root
|
||||
Loading…
Add table
Add a link
Reference in a new issue