Ansible: Bad configuration option: pubkeyacceptedalgorithms

Viewed 1171

I'm running ansible core v2.12.5 via Docker with Python 3.10.4.

In my host Ubuntu 22.04 ssh/config I have these entries:

Host git-codecommit.*.amazonaws.com
  User AP-----------------
  IdentityFile ~/.ssh/id_rsa
  IdentitiesOnly yes
  PubkeyAcceptedAlgorithms +ssh-rsa
  HostkeyAlgorithms +ssh-rsa

Host 172.x.y.z
  IdentitiesOnly yes
  PubkeyAcceptedAlgorithms +ssh-rsa
  HostkeyAlgorithms +ssh-rsa

Because that two hosts need that ssh-rsa.

Now, I'm tryng to run Ansible from my Ubuntu 22.04 to perform some task to another Ubuntu 22.04.

I get this error in console:

TASK [Gathering Facts] ******************************************************************************************************************************************************************************
fatal: [192.168.1.42]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: /root/.ssh/config: line 5: Bad configuration option: pubkeyacceptedalgorithms\r\n/root/.ssh/config: line 10: Bad configuration option: pubkeyacceptedalgorithms\r\n/root/.ssh/config: terminating, 2 bad configuration options", "unreachable": true}

Cannot understand why ansible looks at that options if host to setup is totally different.

0 Answers
Related