ansible-role-common/tasks/sshsettings.yml

24 lines
616 B
YAML
Raw Normal View History

2026-04-13 09:58:09 +02:00
---
# 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