Git-Bash is insufficient to install ansible, it is lack of build tools.

I recommend you try msys2(which git-bash base on), once install all ansible build dependencies, you can install ansible just by pip install ansible.

Answer from Mithril on Stack Exchange
๐ŸŒ
Ansible
docs.ansible.com โ€บ projects โ€บ ansible โ€บ latest โ€บ installation_guide โ€บ intro_installation.html
Installing Ansible โ€” Ansible Community Documentation
The ansible or ansible-core packages may be available in your operating systems package manager, and you are free to install these packages with your preferred method. For more information, see the Installing Ansible on specific operating systems guide.
๐ŸŒ
Ansible
docs.ansible.com โ€บ projects โ€บ ansible โ€บ latest โ€บ installation_guide โ€บ installation_distros.html
Installing Ansible on specific operating systems โ€” Ansible Community Documentation
Arch Linux repositories include ... the package maintainers by opening an issue in the related package GitLab repository. You cannot use a Windows system for the Ansible control node....
Discussions

Slowly convinced that Ansible is impossible to install on Windows.
Enable wsl Reboot Install ubuntu via windows store Now start ubuntu, run the next commands in ubuntu shell after creating a user. 4. sudo apt update && sudo apt install python3 python3-pip pipx 5. pipx install ansible --include-deps && pipx ensurepath 6. Restart ubuntu 7. Run ansible You're welcome, latest and greatest ansible in venv installed on windows. More on reddit.com
๐ŸŒ r/ansible
25
0
August 26, 2025
pip - Installing Ansible Python package on Windows - Stack Overflow
I'm struggling to install Ansible Python package on my Windows 10 machine. I don't need Ansible to run on my machine, this is purely for development purpose on my Windows host. All commands will l... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Ansible on Windows 10 via WSL - working without issue
This is even better https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack More on reddit.com
๐ŸŒ r/ansible
15
27
May 16, 2019
Preferred way to develop with Ansible on Windows host?

I use vscode on Windows and the SSH extension and open the folder containing my playbooks on my Ansible control node server over SSH.

More on reddit.com
๐ŸŒ r/ansible
14
13
February 14, 2021
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to install ansible on windows
How to Install Ansible on Windows: 3 Methods
December 9, 2025 - Install Ansible with WSL by following the steps below: 1. Press the Windows key and type powershell. In the right panel, select the Run as administrator option. 2. Run the following command to install WSL and Ubuntu: ... Note: To install a ...
๐ŸŒ
Medium
medium.com โ€บ @redswitches โ€บ how-to-install-ansible-on-windows-1d26526fe40f
How to Install Ansible on Windows | Medium
July 31, 2024 - Learn how to install Ansible on Windows with this step-by-step guide. Start automating tasks now!
๐ŸŒ
Automatesql
automatesql.com โ€บ blog โ€บ 3-ways-to-install-ansible-on-windows
3 Ways to Install Ansible on Windows
January 22, 2025 - When I talk about installing Ansible, I'm referring to installing the Ansible control nodeโ€”the machine from which you run ansible or ansible-playbook commands. Since Ansible is not directly supported on Windows, you can't just install it natively.
๐ŸŒ
OneUptime
oneuptime.com โ€บ home โ€บ blog โ€บ how to install ansible on windows using wsl2
How to Install Ansible on Windows Using WSL2
February 21, 2026 - Once you are at the bash prompt, update the system: # Update package lists and upgrade installed packages sudo apt update && sudo apt upgrade -y ยท You have two options: install from the PPA (recommended) or install via pip.
๐ŸŒ
Ansible
docs.ansible.com โ€บ projects โ€บ ansible โ€บ latest โ€บ os_guide โ€บ windows_usage.html
Using Ansible and Windows โ€” Ansible Community Documentation
Ansible can be used to orchestrate a multitude of tasks on Windows servers. Below are some examples and info about common tasks. There are three main ways that Ansible can be used to install software:
Find elsewhere
๐ŸŒ
Ansible Galaxy
galaxy.ansible.com โ€บ ansible โ€บ windows
ansible.windows
March 16, 2026 - We cannot provide a description for this page right now
๐ŸŒ
Ansible
docs.ansible.com โ€บ projects โ€บ ansible โ€บ latest โ€บ installation_guide โ€บ index.html
Installation Guide โ€” Ansible Community Documentation
Installing Ansible on Windows ยท Configuring Ansible ยท Configuration file ยท Environmental configuration ยท
๐ŸŒ
UltaHost
ultahost.com โ€บ knowledge-base โ€บ install-ansible-on-windows
How to Install Ansible on Windows | Ultahost Knowledge Base
June 8, 2024 - Learn how to install Ansible on Windows with our guide. Follow instructions to set up Ansible for seamless automation on your Windows system.
๐ŸŒ
4sysops
4sysops.com โ€บ home โ€บ blog โ€บ articles โ€บ install ansible on windows
Install Ansible on Windows โ€“ 4sysops
July 28, 2023 - While Linux-managed nodes need ... Ansible server bits run only on Linux. Thus, you'll need to set up WSL2 on your Windows Server control node before you can install Ansible....
Top answer
1 of 5
15

Installing Ansible on Windows is cumbersome. My advice is not a direct solution on how to install Ansible on Windows, but rather a workaround.

I use a Docker container with Ansible for developing playbooks on my Windows machine. You'd need Docker for Windows on your machine.

Here's the Dockerfile:

FROM alpine:3.7

ENV ANSIBLE_VERSION=2.5.4

ENV BUILD_PACKAGES \
        bash \
        curl \
        tar \
        nano \
        openssh-client \
        sshpass \
        git \
        python \
        py-boto \
        py-dateutil \
        py-httplib2 \
        py-jinja2 \
        py-paramiko \
        py-pip \
        py-setuptools \
        py-yaml \
        ca-certificates

RUN apk --update add --virtual build-dependencies \
        gcc \
        musl-dev \
        libffi-dev \
        openssl-dev \
        python-dev && \
    set -x && \
    apk update && apk upgrade && \
    apk add --no-cache ${BUILD_PACKAGES} && \
    pip install --upgrade pip && \
    pip install python-keyczar docker-py boto3 botocore && \
    apk del build-dependencies && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /etc/ansible/ /ansible && \
    echo "[local]" >> /etc/ansible/hosts && \
    echo "localhost" >> /etc/ansible/hosts && \
    curl -fsSL https://releases.ansible.com/ansible/ansible-${ANSIBLE_VERSION}.tar.gz -o ansible.tar.gz && \
    tar -xzf ansible.tar.gz -C /ansible --strip-components 1 && \
    rm -fr ansible.tar.gz /ansible/docs /ansible/examples /ansible/packaging

ENV ANSIBLE_GATHERING=smart \
    ANSIBLE_HOST_KEY_CHECKING=false \
    ANSIBLE_RETRY_FILES_ENABLED=false \
    ANSIBLE_ROLES_PATH=/ansible/playbooks/roles \
    ANSIBLE_SSH_PIPELINING=True \
    PYTHONPATH=/ansible/lib \
    PATH=/ansible/bin:$PATH \
    ANSIBLE_LIBRARY=/ansible/library \
    EDITOR=nano

WORKDIR /ansible/playbooks

ENTRYPOINT ["ansible-playbook"]

Build the docker container with the docker build command. Afterwards you can create a small bash script that executes the docker run command and mounts your current directory into the container. You may call it ansible-playbook.sh:

winpty docker run --rm -it -v /$(pwd):/ansible/playbooks <name of your container> $@

Now you will be able to launch Ansible playbook with ./ansible-playbook.sh <your playbook> in GIT BASH. If you'd like to run this in PowerShell you would probably need to remove the winpty command, but I did not test this in PS yet.

It is not the finest solution but it gets the work done. Hope it helps you, too.

2 of 5
10

I've managed to install ansible on Windows 10 with following steps (ran in powershell):

  • Clone ansible repository, e.g. to ansible folder
  • pip3 install -e .\ansible\

You may also need to make a symbolic link, however, shouldn't be neccessary:

New-Item -ItemType SymbolicLink -Name ansible_release.py -Target .\lib\ansible\release.py

Ansible will be somewhat unusable for development, because it's using some Unix-only modules like grp or pwd. For example, you won't be able to run unit tests (e.g. module_utils/basic.py imports grp and pwd). Downloading grp.py to site-packages folder won't help.

To have a smoother experience, I recommend installing WSL (Windows Subsystem for Linux) plus install python with pip and just run pip install ansible. Here's how you can use WSL for development in Visual Studio Code

๐ŸŒ
AnsiblePilot
ansiblepilot.com โ€บ articles โ€บ how-to-install-ansible-in-windows-10-wsl-windows-subsystem-for-linux
How to install Ansible in Windows 10 WSL Windows Subsystem for Linux - Ansible install
Learn how to install Ansible on Windows 10 using the Windows Subsystem for Linux (WSL), leveraging its compatibility for seamless automation tasks.
Published ย  November 17, 2024
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ how-to-install-and-configure-ansible-on-windows
How to Install and Configure Ansible on Windows?
March 17, 2026 - In the same PowerShell window, run the following command ... This command will download and install Ansible and its dependencies. Once installation is complete, you can verify that Ansible is installed by running
๐ŸŒ
Medium
medium.com โ€บ @arth2048 โ€บ set-up-ansible-on-windows-11-using-wsl-2141100b573b
Set up Ansible on Windows 11 using WSL
June 28, 2024 - Once opened scroll down to โ€œWindows ... โ€” following instructions assume a Debian OS like Ubuntu) You can start up a WSL terminal via the start menu ......
๐ŸŒ
Ansible
docs.ansible.com โ€บ projects โ€บ ansible โ€บ latest โ€บ os_guide โ€บ index.html
Using Ansible on Windows, BSD, and z/OS UNIX โ€” Ansible Community Documentation
Because Windows is not a POSIX-compliant operating system, Ansible interacts with Windows hosts differently than Linux/Unix hosts. Likewise, managing hosts that run BSD is different than managing other Unix-like host operating systems. Find out everything you need to know about using Ansible on ...
๐ŸŒ
Spacelift
spacelift.io โ€บ blog โ€บ how-to-install-ansible
How to Install Ansible on Ubuntu, RHEL, macOS & CentOS
Learn how you can install Ansible using pip and on different operating systems like Ubuntu, RHEL, CentOs, Windows, and macOS.
Published ย  October 10, 2025