<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ansible Installation on Jhooq</title><link>https://jhooq.com/tags/ansible-installation/</link><description>Recent content in Ansible Installation on Jhooq</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Jhooq</copyright><lastBuildDate>Wed, 06 Jul 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://jhooq.com/tags/ansible-installation/index.xml" rel="self" type="application/rss+xml"/><item><title>Install Ansible on Ubuntu, Fedora, CentOS, macOS and Windows (WSL) in 2026: pip, pipx, and the Python Version Trap</title><link>https://jhooq.com/ansible-installation/</link><pubDate>Wed, 06 Jul 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-installation/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ansible only needs to be installed on the control node&lt;/strong&gt;, the machine you run &lt;code&gt;ansible&lt;/code&gt; from. Managed nodes need Python and SSH, not Ansible (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/installation_guide/intro_installation.rst"&gt;installation guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fastest route on Linux and macOS:&lt;/strong&gt; &lt;code&gt;python3 -m venv ansible-env&lt;/code&gt;, &lt;code&gt;ansible-env/bin/pip install ansible&lt;/code&gt;, then &lt;code&gt;ansible --version&lt;/code&gt;. On 2026-11-03 this gave me Ansible 12.3.0 with ansible-core 2.19.15 and a working &lt;code&gt;ansible localhost -m ping&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The trap:&lt;/strong&gt; pip picks the newest release your Python supports. ansible-core 2.20 and 2.21 need Python 3.12 or newer, 2.22 needs 3.13 or newer, so on Python 3.11 you silently stay on 2.19.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows:&lt;/strong&gt; there is no native control node. Install WSL and follow the Linux steps inside it (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/os_guide/intro_windows.rst"&gt;Windows guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you already have Ansible and need to target one machine, read &lt;a href="https://jhooq.com/ansible-limit-hosts/"&gt;ansible --limit and hosts&lt;/a&gt;; if you want a safe lab first, read &lt;a href="https://jhooq.com/ansible-lab-on-laptop-with-docker/"&gt;Ansible lab on a laptop with Docker&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/5bEAZ0La_Xo?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-you-are-installing-and-where"&gt;What you are installing and where&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-pick-the-route"&gt;Pick the route&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-install-with-pip-in-a-venv-linux-and-macos"&gt;Install with pip in a venv (Linux and macOS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-install-with-pipx"&gt;Install with pipx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-ubuntu-and-debian-packages"&gt;Ubuntu and Debian packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-fedora-centos-stream-rocky-and-almalinux"&gt;Fedora, CentOS Stream, Rocky and AlmaLinux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-macos"&gt;macOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-windows-with-wsl"&gt;Windows with WSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-verify-with-ad-hoc-commands"&gt;Verify with ad-hoc commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#11-next-steps"&gt;Next steps&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-what-you-are-installing-and-where"&gt;1. What you are installing and where&lt;/h2&gt;
&lt;p&gt;Ansible is agentless. You install it once on the control node, and it talks to managed nodes over SSH (or WinRM for Windows targets). The managed node needs a Python interpreter to run the modules Ansible copies over, with the exception of network modules (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/installation_guide/intro_installation.rst"&gt;installation guide&lt;/a&gt;).&lt;/p&gt;</description></item></channel></rss>