Set ForwardX11 with ansible ssh config

362 Views Asked by At

While connecting to a managed host(netapp device) using command module, I get the below error.

TASK [Gathering Facts] *********************************************************
fatal: [10.20.30.40]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: X11 forwarding request failed", "unreachable": true}

How to set ssh setting "ForwardX11 no" with ansible configuration / ansible-playbook command line option.

I don't want to change ssh settings in user directory.

1

There are 1 best solutions below

0
On

Try passing ssh arguments in command line ansible-playbook --ssh-common-args='-o ForwardX11=no' <rest_of_the_commands>