diff --git a/playbooks/roles/backup/tasks/main.yaml b/playbooks/roles/backup/tasks/main.yaml index 91f4dca1d0..2c3bee1c2a 100644 --- a/playbooks/roles/backup/tasks/main.yaml +++ b/playbooks/roles/backup/tasks/main.yaml @@ -24,7 +24,7 @@ - name: Configure ssh for backup server blockinfile: - path: /root/.ssh/ssh_config + path: /root/.ssh/config create: true block: | Host {{ item }} @@ -41,7 +41,7 @@ - name: Accept hostkey of backup server known_hosts: state: present - key: '{{ item }} ecdsa-sha2-nistp256 {{ hostvars[item]["ansible_ssh_host_key_ed25519_public"] }}' + key: '{{ item }} ssh-ed25519 {{ hostvars[item]["ansible_ssh_host_key_ed25519_public"] }}' name: '{{ item }}' with_inventory_hostnames: backup-server diff --git a/testinfra/test_backups.py b/testinfra/test_backups.py index d5b83d24f8..ed0daebab7 100644 --- a/testinfra/test_backups.py +++ b/testinfra/test_backups.py @@ -53,7 +53,7 @@ def test_backup_host_config(host): f = host.file('/root/.ssh/id_backup_ed25519') assert f.exists - f = host.file('/root/.ssh/ssh_config') + f = host.file('/root/.ssh/config') assert f.exists assert f.contains('Host backup01.region.provider.opendev.org')