add option to download file
This commit is contained in:
parent
8e05ea2749
commit
18998c7e97
2 changed files with 13 additions and 0 deletions
|
|
@ -9,3 +9,4 @@ files_default:
|
|||
content: ~
|
||||
template: ~
|
||||
template_vars: {}
|
||||
url: ~
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
- name: "create file/folder (file module, {{ file.path }})"
|
||||
when:
|
||||
- not file.url
|
||||
- not file.content
|
||||
- not file.template
|
||||
file:
|
||||
|
|
@ -18,6 +19,7 @@
|
|||
when:
|
||||
- file.content or file.src
|
||||
- file.state != 'link'
|
||||
- not file.url
|
||||
copy:
|
||||
dest: "{{ file.path }}"
|
||||
group: "{{ file.group }}"
|
||||
|
|
@ -25,3 +27,13 @@
|
|||
mode: "{{ file.mode }}"
|
||||
content: "{{ file.content }}"
|
||||
src: "{{ file.src }}"
|
||||
|
||||
- name: "create file/folder (get_url module, {{ file.path }})"
|
||||
when:
|
||||
- file.url
|
||||
get_url:
|
||||
url: "{{ file.url }}"
|
||||
dest: "{{ file.path }}"
|
||||
group: "{{ file.group }}"
|
||||
owner: "{{ file.owner }}"
|
||||
mode: "{{ file.mode }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue