1
我試圖用ansible執行兩個服務器之間的簡單複製任務拷貝文件,我的劇本腳本是:不能與ansible 2.2模塊
- hosts: 10.100.12.26
remote_user: myUser
vars:
MERCHANT_API_DEST_DIR: "/tmp/"
MERCHANT_API_SRC_DIR: "/source/folder/"
tasks:
- name: Copy the spring boot jar to the host destiny
become: true
become_method: sudo
copy:
src: "{{item}}"
dest: "{{MERCHANT_API_DEST_DIR}}"
with_fileglob: "{{MERCHANT_API_SRC_DIR}}/file-name-*.jar"
當我執行的劇本有:
ansible-playbook my-playbook.yml --ask-pass
我得到的消息:
fatal: [10.100.12.26]: FAILED! => {"failed": true, "msg": "Failed to get information on remote file (/tmp/file-name-1.13.jar): MODULE FAILURE"}
我無法弄明白的問題是什麼,有人可以幫我嗎?
這是一個已知的bug :https://github.com/ansible/ansible/issues/15721 – helloV