First of all thanks for help. here is output:
changed: [localhost] => (item=hurry-up-1) => {
"changed": true,
"cmd": "ssh \"hurry-up-1\"",
"delta": "0:00:00.382495",
"end": "2017-10-19 15:18:03.301177",
"failed": false,
"invocation": {
"module_args": {
"chdir": null,
"command": "ssh \"hurry-up-1\"",
"creates": null,
"echo": false,
"removes": null,
"responses": {
"(?i)root": "tar cvf \"$HOSTNAME\"_`date +\"%Y-%m-%d_%H.%M.%S\"`.tar test\nexit\n"
},
"timeout": 30
}
},
"item": "hurry-up-1",
"rc": 0,
"start": "2017-10-19 15:18:02.918682"
}
STDOUT:
Last login: Thu Oct 19 14:33:19 2017 from localhost
hurry-up-1 ~]# tar cvf "$HOSTNAME"_`date +"%Y-%m-%d_%H.%M.%S"`.tar
test/
[root@hurry-up-1 ~]# exit
logout
Connection to hurry-up-1 closed.
TASK [setup-sftp-session : crates sftp session to terastation] ******************************************************************************************************************************************************************************
task path: /etc/ansible/roles/setup-sftp-session/tasks/setup-sftp.yml:13
Using module file /usr/lib/python2.6/site-packages/ansible-2.4.1.0-py2.6.egg/ansible/modules/commands/expect.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574 `" && echo ansible-tmp-1508440683.35-276654372992574="` echo /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmpTC63A9 TO /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574/expect.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574/ /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574/expect.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2.6 /root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574/expect.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1508440683.35-276654372992574/" > /dev/null 2>&1 && sleep 0'