Member-only story

Copy files from Windows remote hosts — Ansible module fetch

How to automate the copy and validate the checksum of example.txt file in the Desktop to a Linux Ansible Controller using Ansible Playbook and fetch module.

Luca Berton
5 min readJan 31, 2022

How to Copy files from Windows remote hosts with Ansible?

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

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

Ansible Copy files from Windows remote hosts

  • ansible.builtin.fetch
  • Copy files from remote nodes

Today we’re talking about the Ansible module `fetch`.

The full name is `ansible.builtin.fetch` which means is part of the collection of modules “builtin” with ansible and shipped with it.

This module is pretty stable and out for years.

The purpose is to copy files from remote locations. Please note that the opposite is done by module `copy` for Linux and `win_copy` for Windows.

Parameters

--

--

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