有个目录(内有文件,子目录, link)在控制机上,要复制到目标机上,咋就辣么难呢?
Playbook:
- hosts: testvbox
become: true
tasks:
- name: Copy Paraview lib files
src: /etc/ansible/files/ParaView-5.3.0-Qt5-OpenGL2-MPI-Linux-64bit/lib/
dest: /usr/local/lib/
archive: no
links: yes
报错:
TASK [Copy Paraview lib files] *************************************************
fatal: [192.168.123.165]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --links --rsh 'ssh -S none -o StrictHostKeyChecking=no' --rsync-path=\"sudo rsync\" --out-format='<<CHANGED>>%i %n%L' \"/etc/ansible/files/ParaView-5.3.0-Qt5-OpenGL2-MPI-Linux-64bit/lib/\" \"[email protected]:/usr/local/lib/\"", "failed": true, "msg": "sudo: no tty present and no askpass program specified\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n", "rc": 12}
to retry, use: --limit @/etc/ansible/test.retry
试了 copy 模块也失败了!
呼唤老司机!
Playbook:
- hosts: testvbox
become: true
tasks:
- name: Copy Paraview lib files
src: /etc/ansible/files/ParaView-5.3.0-Qt5-OpenGL2-MPI-Linux-64bit/lib/
dest: /usr/local/lib/
archive: no
links: yes
报错:
TASK [Copy Paraview lib files] *************************************************
fatal: [192.168.123.165]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --links --rsh 'ssh -S none -o StrictHostKeyChecking=no' --rsync-path=\"sudo rsync\" --out-format='<<CHANGED>>%i %n%L' \"/etc/ansible/files/ParaView-5.3.0-Qt5-OpenGL2-MPI-Linux-64bit/lib/\" \"[email protected]:/usr/local/lib/\"", "failed": true, "msg": "sudo: no tty present and no askpass program specified\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n", "rc": 12}
to retry, use: --limit @/etc/ansible/test.retry
试了 copy 模块也失败了!
呼唤老司机!