Automation Tools/Ansible
1.3 ansible | [test][playbook] 원격지에서 파일 가져오기
ploz
2021. 3. 16. 14:48
반응형
[root@OPENLDAP-TEST ansible]# cat fetch.yml
---
- name: "fetch file"
hosts: test02
become: true
tasks:
- name: "fetch files" # fetch 모듈 사용.
fetch:
src: /etc/hosts
dest: /root/
flat: yes
## 주의 dest 경로 끝에 "/"을 꼭 붙여야 함.
## flat 을 추가 하지 않으면 src 경로 전체가 복사 됨.
반응형