앤서블을 사용해 압축 파일을 복사하려고 하는데 에러가 발생했다.

copy: src={{downlod_result_jenkins.dest}}
dest={{service_path}}/jenkins
remote_src=no
group={{default_user}}
owner={{default_group}}

FAILED! => {"changed": false, "msg": "Could not find or access '/file.war' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}




https://github.com/ansible/ansible/issues/31926을 보니 일부러 앤서블에서 막은 듯 해서.

아래와 같이 압축 파일 복사는 다음과 같이 command 모듈을 사용해 진행했다.


- name : jenkins 복사 - {{service_path}}/jenkins
command: cp -r {{downlod_result_jenkins.dest}}\ {{service_path}}/jenkins


Posted by '김용환'
,