mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
new module: get_url
get module (with new module-magic-code!) Usage: ansible -m get -a "url=http://xxxxxxx dest=fileordirctory" all cleanups as per @mpdehaan's suggestions add daisychain added example playbook (get_url.yml) with URLencode example
This commit is contained in:
parent
d69e70db01
commit
b8d7b5041b
2 changed files with 279 additions and 0 deletions
16
examples/playbooks/get_url.yml
Normal file
16
examples/playbooks/get_url.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- hosts: webservers
|
||||
vars:
|
||||
- jquery_directory: /var/www/html/javascript
|
||||
- person: 'Susie%20Smith'
|
||||
tasks:
|
||||
- name: Create directory for jQuery
|
||||
action: file dest=${jquery_directory} state=directory mode=0755
|
||||
- name: Grab a bunch of jQuery stuff
|
||||
action: get_url url=http://code.jquery.com/$item dest=${jquery_directory} mode=0444
|
||||
with_items:
|
||||
- jquery.min.js
|
||||
- mobile/latest/jquery.mobile.min.js
|
||||
- ui/jquery-ui-git.css
|
||||
- name: Pass urlencoded name to CGI
|
||||
action: get_url url=http://example.com/name.cgi?name='${person}' dest=/tmp/test
|
Loading…
Add table
Add a link
Reference in a new issue