Ansible Module get url: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
   get_url:
   get_url:
     url: "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-macos-jdk.pkg"
     url: "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-macos-jdk.pkg"
     dest: "/Users/ovidiufeodorov/tmp"
     dest: "/tmp"
     mode: "u=rw,g=r,o=r"
     mode: "u=rw,g=r,o=r"
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 23:33, 29 December 2020

External

Internal

Overview

Idempotenly make a filesystem on the specified device.

Example

- name: Download Amazon Corretto
  get_url:
    url: "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-macos-jdk.pkg"
    dest: "/tmp"
    mode: "u=rw,g=r,o=r"
- name: download multiple items
  get_url:
    url: "{{ item.script_url }}"
    dest: "{{ item.dest }}"
    mode: "u=rw,g=r,o=r"
  with_items:
      - {script_url: "https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash", dest: "{{ ansible_env.HOME }}/.git-completion.bash"}
      - {script_url: "https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh", dest: "{{ ansible_env.HOME }}/.git-prompt.sh"}