I have a very strange situation where a host that responds to ansible ping and i can ssh into gives Data could not be sent to remote host
Any idea how can i debug this and most importantly how can this happen?
i have this in invetory:
Check /etc/security/access.conf to see if root is only allowed from certain IP addresses on your problematic host.
By the way, allowing remote root login is very bad. It has been considered a security best practice to disallow remote root login since the late 1990’s. Your company should rethink this strategy and you should also use a dedicated Ansible user that has sudo access. If you’re doing this in a home lab or whatever, fine, but if this is for anything of any importance at all, PLEASE consider more secure alternatives.
/etc/security/access.conf is untouched on both.
also i beg to differ regarding root access :
disregarding explicit option, but ssh have as default prohibit-password and access is with key only
from attacker point of view there is absolutely no difference between access to a root account and and account that have unrestricted sudo privilege
add to that that it is a norm to allow this (firewall level) only from within local network and have an ssh bastion for external access and it become absolutely pointless to have some user with sudo access (which if it is configured to use password to do sudo then the password must be explicitly set up in ansible vault … and usage of passwords is anyway a security problem)
The problem is even more strange : i can run a playbook with ansible.builtin.raw without problem … the python packages are the same with another identical host (same kickstart template)
Trying the faililng task with -vvvv i got the output that shows:
Seems that the problem was a MTU problem somehow:
while all datacenter and the ansible controller have an MTU of 9000, the host that did not work also had an MTU of 9000 … as soon as i commented the option (to get back to default of 1500) the ssh control no longer broke … i see no logic on this but this is the reality …