Hii,
I am trying to transfer my files from ansible linux to sftp server.
- How to add sftp host in my ansible host file.
- I had added scp_if_ssh=False in [ssh-connection] in ansible.cfg
- This sftp server not have any ssh where i have only sftp connectivity.
- Is there any way to connect ansible to sftp and the port using here is 4222
- In the host file i added host in this way as below
[sftp]
sftp.exampletest.com ansible_port=4222
The error is
root@sgplubuntu125:/etc/ansible/playbooks# ansible sftp -m ping
sftp.exampletest.com | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: command-line line 0: Missing argument.\r\n”,
“unreachable”: true
}
can anyone help me please
Thanks,