0

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.

itsraja
  • 1,640
  • 4
  • 32
  • 48
  • While connecting manually the same error is occurring as warning but command prompt shows up after it. This is a netapp device. ssh 'mydomain\username'@10.20.30.40 Password: Warning: No xauth data; using fake authentication data for X11 forwarding. X11 forwarding request failed on channel 0 Last login time: 11/17/2020 12:05:42 BLRBABCD01::> – itsraja Dec 03 '20 at 11:58

1 Answers1

0

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

Syam Sankar
  • 361
  • 1
  • 6