--- # 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