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: ~
|
content: ~
|
||||||
template: ~
|
template: ~
|
||||||
template_vars: {}
|
template_vars: {}
|
||||||
|
url: ~
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- name: "create file/folder (file module, {{ file.path }})"
|
- name: "create file/folder (file module, {{ file.path }})"
|
||||||
when:
|
when:
|
||||||
|
- not file.url
|
||||||
- not file.content
|
- not file.content
|
||||||
- not file.template
|
- not file.template
|
||||||
file:
|
file:
|
||||||
|
|
@ -18,6 +19,7 @@
|
||||||
when:
|
when:
|
||||||
- file.content or file.src
|
- file.content or file.src
|
||||||
- file.state != 'link'
|
- file.state != 'link'
|
||||||
|
- not file.url
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ file.path }}"
|
dest: "{{ file.path }}"
|
||||||
group: "{{ file.group }}"
|
group: "{{ file.group }}"
|
||||||
|
|
@ -25,3 +27,13 @@
|
||||||
mode: "{{ file.mode }}"
|
mode: "{{ file.mode }}"
|
||||||
content: "{{ file.content }}"
|
content: "{{ file.content }}"
|
||||||
src: "{{ file.src }}"
|
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