各位學長,小弟有個問題想請教,如何從C執行ansible把a的檔案copy到B,我是用以下的程式碼去執行,但沒辦法成功,我確認機器是正常,想請問各位學長有做過這樣的測試嗎?
- name: copy test
hosts: DNS-Test
sudo: True
tasks:
- name: copy test
synchronize: mode=pull src=/etc/named.conf dest=/tmp/
delegate_to: DNS-Test2
錯誤訊息
TASK [copy test] ***************************************************************
fatal: [10.88.3.112]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true}
to retry, use: --limit @test.retry
PLAY RECAP *********************************************************************
10.88.3.112 : ok=1 changed=0 unreachable=1 failed=0