Ansible File Commands

From rbachwiki
Revision as of 19:05, 22 June 2022 by Bacchas (talk | contribs) (Created page with "=Copy File to remote servers= --- - name: copy file from local to remote hosts: all tasks: - name: copy file copy: src: ~/photo.jpg dest: ~/ owner: root group: root mode: 0777")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Copy File to remote servers

---
- name: copy file from local to remote
 hosts: all
 
 tasks:
 - name: copy file
   copy:
     src: ~/photo.jpg
     dest: ~/    
     owner: root
     group: root
     mode: 0777