-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(download_file): Download a file
- Loading branch information
Showing
6 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Ansible Role - radiorabe.common.download_file | ||
|
||
Download a file using [`ansible.builtin.get_url`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html). | ||
|
||
## Requirements | ||
|
||
None | ||
|
||
## Role Variables | ||
|
||
| Variable | Default | Description | | ||
| -------- | ------- | ----------- | | ||
| `download_file_url` | `https://rabe.ch/wp-content/uploads/2016/07/favicon.ico` | URL of file to be downloaded. | | ||
| `download_file_destination` | `/tmp/` | Downloaded file detination path on remote host. | | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
|
||
## Example Playbook | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
```yaml | ||
- hosts: all | ||
roles: | ||
- download_file | ||
``` | ||
## License | ||
This role is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
# defaults file for download_file | ||
download_file_url: https://rabe.ch/wp-content/uploads/2016/07/favicon.ico | ||
download_file_destination: /tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
galaxy_info: | ||
author: RaBe IT-Reaktion | ||
description: Download file | ||
issue_tracker_url: https://github.com/radiorabe/ansible-collection-common/issues | ||
license: AGPL-3.0-only | ||
min_ansible_version: '2.9' | ||
platforms: | ||
- name: EL | ||
versions: | ||
- all | ||
- name: Fedora | ||
version: | ||
- all | ||
galaxy_tags: | ||
- radiorabe | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# tasks file for download_file | ||
- name: Download file | ||
get_url: | ||
url: "{{ download_file_url }}" | ||
dest: "{{ download_file_destination }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
localhost | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- download_file |