Playbook to copy local file to hosts
This commit is contained in:
17
playbooks/copy-file.yml
Normal file
17
playbooks/copy-file.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- hosts: all
|
||||
vars_prompt:
|
||||
- name: path
|
||||
prompt: "Enter path to file"
|
||||
private: no
|
||||
- name: remote_path
|
||||
prompt: "Enter path to copy file to"
|
||||
private: no
|
||||
tasks:
|
||||
- name: Copy file to remote hosts
|
||||
copy:
|
||||
src: "{{ path }}"
|
||||
dest: "{{ remote_path }}"
|
||||
owner: akshun
|
||||
group: akshun
|
||||
mode: u=rw,g=rw,o=r
|
||||
Reference in New Issue
Block a user