There are other options to tackle your issue… depending on your needs / use case
Add custom SSH client config allowing the deprecated algo,
either in ~/.ssh/config (per host / match)
Host 192.168.150.20
KexAlgorithms +diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
Ciphers +aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
For instance, in our environment, it’s likely there are many machines with old ssh server, so rather than specify per host
set globally in /etc/ssh/ssh_config.d/deprecated.conf:
KexAlgorithms +diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
Ciphers +aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
The way you’ve chosen to do it is probably best… just sharing other available options…
Also if you are new to AWX, there will be a time (probably soon) where you’ll have to build your own execution environment to handle more specific cases / tasks
for this, you should look at ansible-builder to build a customized container (runner)
There are a million and one ways to configure it, it can be difficult to get started,
I’ve put together a template that can help get you started
https://github.com/j-oss2023/ansible-builder-template
Good luck !