当直接从我的机器运行时,以下任务工作正常。当我通过 SSH 从远程计算机运行它时,它永远挂起。
这是任务:
- name: deploy public directory
synchronize: src="{{ my_root_path }}/.deploy/office/public/" dest="{{ my_root_path}}/office/public/" compress=no checksum=yes delete=yes recursive=yes times=yes links=yes archive=no rsync_opts=--no-motd,--exclude=.gitignore
delegate_to: "{{ inventory_hostname }}"
Run Code Online (Sandbox Code Playgroud)
这是挂起之前的输出:
<88.81.184.149> ESTABLISH CONNECTION FOR USER: root
<88.81.184.149> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 88.81.184.149 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1440505364.9-19277754718304 && echo $HOME/.ansible/tmp/ansible-tmp-1440505364.9-19277754718304'
<88.81.184.149> PUT /tmp/tmpr44yYm TO /root/.ansible/tmp/ansible-tmp-1440505364.9-19277754718304/synchronize
<88.81.184.149> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" …Run Code Online (Sandbox Code Playgroud)