Skip to content
Snippets Groups Projects
Unverified Commit 18998c7e authored by nd's avatar nd
Browse files

add option to download file

parent 8e05ea27
No related branches found
No related tags found
No related merge requests found
...@@ -9,3 +9,4 @@ files_default: ...@@ -9,3 +9,4 @@ files_default:
content: ~ content: ~
template: ~ template: ~
template_vars: {} template_vars: {}
url: ~
...@@ -4,6 +4,7 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment