Member-only story

Download a file — Ansible module get_url

How to download a tarball, verify the checksum, assign some permission with Ansible

Luca Berton
4 min readSep 13, 2021

How to download a file with Ansible?

I’m going to show you a live demo and some simple Ansible code.

I’m Luca Berton, and welcome to today’s episode of Ansible Pilot.

Ansible download a file

Today we’re talking about the Ansible module get_url.

The full name is ansible.builtin.get_url, which means that it is part of the collection of modules “builtin” with ansible and shipped with it, part of `ansible-core`.

It’s a module that is pretty stable and out for years.

It works in a different variety of operating systems.

It downloads files from HTTP, HTTPS, or FTP to the node.

For Windows targets, use the `ansible.windows.win_get_url` module instead.

Main Parameters

  • url string — URL
  • dest string — path
  • force string — no/yes
  • checksum string —

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet