# \#python

**URL:** https://forum.ansible.com/tag/python/316.md

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

---

## [CfgMgmtCamp 2026 discussion (1/12): Supported Python versions, or: supporting older Operating Systems](https://forum.ansible.com/t/cfgmgmtcamp-2026-discussion-1-12-supported-python-versions-or-supporting-older-operating-systems/45288)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 5\
**Last updated:** [May 26, 2026, 7:14am UTC](https://forum.ansible.com/t/cfgmgmtcamp-2026-discussion-1-12-supported-python-versions-or-supporting-older-operating-systems/45288 "2026-05-26T07:14:32Z")

</div>

As a user Supported Python versions, or: supporting older Operating Systems Latest developments This was discussed at CfgMgmtCamp 2026. Something is apparently happening here. There exists a PR for ansible-core that wo…

---

## [Python version(s) for custom plugins](https://forum.ansible.com/t/python-version-s-for-custom-plugins/2872)

<div class="topic-metadata">

**Author:** [@utoddl](https://forum.ansible.com/u/utoddl)\
**Replies:** 3\
**Last updated:** [April 26, 2026, 4:59pm UTC](https://forum.ansible.com/t/python-version-s-for-custom-plugins/2872 "2026-04-26T16:59:04Z")

</div>

On the flip side — that is, from the custom content (plugin) creators’ perspective — and spurred by this discussion: Maintain Ansible 9 for longer than 6 months, I have a question. Maybe this is more a Python thing than …

---

## [Ansible Core 2.18 fails on remote host with Python 3.6 — future feature annotations is not defined during fact gathering](https://forum.ansible.com/t/ansible-core-2-18-fails-on-remote-host-with-python-3-6-future-feature-annotations-is-not-defined-during-fact-gathering/44802)

<div class="topic-metadata">

**Author:** [@harshit.sheth](https://forum.ansible.com/u/harshit.sheth)\
**Replies:** 2\
**Last updated:** [November 10, 2025, 4:16pm UTC](https://forum.ansible.com/t/ansible-core-2-18-fails-on-remote-host-with-python-3-6-future-feature-annotations-is-not-defined-during-fact-gathering/44802 "2025-11-10T16:16:43Z")

</div>

Hello Team, I’m encountering a blocking issue with Ansible Core 2.18.10 when running playbooks on remote hosts that only have Python 3.6.8 installed. The error occurs during the Gathering Facts phase and prevents the pl…

---

## [Connection errors for my first self written ActionModule](https://forum.ansible.com/t/connection-errors-for-my-first-self-written-actionmodule/44209)

<div class="topic-metadata">

**Author:** [@mvlaarprox](https://forum.ansible.com/u/mvlaarprox)\
**Replies:** 2\
**Last updated:** [August 6, 2025, 5:09am UTC](https://forum.ansible.com/t/connection-errors-for-my-first-self-written-actionmodule/44209 "2025-08-06T05:09:28Z")

</div>

General warning before: I’m quite new to Python and Ansible as a whole, coming from strongly typed languages I’m having some issues with the dynamic nature of Python. I’m writing my first ActionModule. It does exactly w…

---

## [Ansible-core devel: drops support for Python 3.11 on controller](https://forum.ansible.com/t/ansible-core-devel-drops-support-for-python-3-11-on-controller/44187)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 0\
**Last updated:** [July 31, 2025, 8:35pm UTC](https://forum.ansible.com/t/ansible-core-devel-drops-support-for-python-3-11-on-controller/44187 "2025-07-31T20:35:37Z")

</div>

As a follow-up to Ansible-core devel: adds support for Python 3.14, drops support for Python 3.8; also AZP's azure-pipelines-test-container got updated, ansible-core devel also dropped support for Python 3.11 on the cont…

---

## [Ansible-core devel: adds support for Python 3.14, drops support for Python 3.8; also AZP's azure-pipelines-test-container got updated](https://forum.ansible.com/t/ansible-core-devel-adds-support-for-python-3-14-drops-support-for-python-3-8-also-azps-azure-pipelines-test-container-got-updated/44168)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 4:12am UTC](https://forum.ansible.com/t/ansible-core-devel-adds-support-for-python-3-14-drops-support-for-python-3-8-also-azps-azure-pipelines-test-container-got-updated/44168 "2025-07-30T04:12:53Z")

</div>

Some PRs have been merged to ansible-core’s devel branch that affect collection CI: ansible-core now supports Python 3.14, and no longer supports Python 3.8: Add support for Python 3.14 and drop Python 3.8 by mattclay …

---

## [Fine-grained command control needed on Ansible task execution](https://forum.ansible.com/t/fine-grained-command-control-needed-on-ansible-task-execution/43982)

<div class="topic-metadata">

**Author:** [@gunjanpb](https://forum.ansible.com/u/gunjanpb)\
**Replies:** 0\
**Last updated:** [July 22, 2025, 12:28pm UTC](https://forum.ansible.com/t/fine-grained-command-control-needed-on-ansible-task-execution/43982 "2025-07-22T12:28:57Z")

</div>

Hi all, I’m looking for a way to enforce restrictions on what operations Ansible is allowed to execute on target nodes, and prevent certain potentially dangerous or unauthorized operations ( shell commands or other Pyth…

---

## [Compute variables per host based on group\_vars](https://forum.ansible.com/t/compute-variables-per-host-based-on-group-vars/42596)

<div class="topic-metadata">

**Author:** [@TheRealBecks](https://forum.ansible.com/u/TheRealBecks)\
**Replies:** 3\
**Last updated:** [May 12, 2025, 2:41pm UTC](https://forum.ansible.com/t/compute-variables-per-host-based-on-group-vars/42596 "2025-05-12T14:41:27Z")

</div>

I have some groups defined for each OS under group\_vars: debian and opensuse directories. For this example I will only write about debian. I defined this file: group\_vars/all/ansible\_groups.yaml: Abstract groups In thi…

---

## [Error seen while executing Ansible script - /usr/bin/python2.7 - No module named site](https://forum.ansible.com/t/error-seen-while-executing-ansible-script-usr-bin-python2-7-no-module-named-site/41576)

<div class="topic-metadata">

**Author:** [@ganeshram2493](https://forum.ansible.com/u/ganeshram2493)\
**Replies:** 1\
**Last updated:** [April 7, 2025, 5:31pm UTC](https://forum.ansible.com/t/error-seen-while-executing-ansible-script-usr-bin-python2-7-no-module-named-site/41576 "2025-04-07T17:31:17Z")

</div>

Error while executing Ansible script - /usr/bin/python2.7 - No module named site. Issue is seen when below Ansible script runs on Rocky9 OS system. Ansible version details: ansible \[core 2.14.17\] config file = /et…

---

## [Custom network OS module](https://forum.ansible.com/t/custom-network-os-module/5153)

<div class="topic-metadata">

**Author:** [@nikuiz](https://forum.ansible.com/u/nikuiz)\
**Replies:** 1\
**Last updated:** [April 2, 2025, 10:27am UTC](https://forum.ansible.com/t/custom-network-os-module/5153 "2025-04-02T10:27:22Z")

</div>

Hi everyone! I was recently charged to automate my company’s network with Ansible. We mainly use EXTREME ERS devices, which are not supported by any library, therefore I’m developping my own network module in order to s…

---

## [\`ansible-playbook\` (\`ansible-core 2.17.1\`) fails on target with \`python 3.9\`](https://forum.ansible.com/t/ansible-playbook-ansible-core-2-17-1-fails-on-target-with-python-3-9/6700)

<div class="topic-metadata">

**Author:** [@sfleisch](https://forum.ansible.com/u/sfleisch)\
**Replies:** 24\
**Last updated:** [March 24, 2025, 1:41pm UTC](https://forum.ansible.com/t/ansible-playbook-ansible-core-2-17-1-fails-on-target-with-python-3-9/6700 "2025-03-24T13:41:35Z")

</div>

Hi all, I have an Ansible target machine running Rocky Linux 8 with Python 3.9.19 installed. \[ansible@punch2 ~\]$ python3 --version Python 3.9.19 \[ansible@punch2 ~\]$ which python3 /usr/bin/python3 \[ansible@punch2 ~\]$ fi…

---

## [How to get ansible to use virtual environment on remote side with a role and local connection](https://forum.ansible.com/t/how-to-get-ansible-to-use-virtual-environment-on-remote-side-with-a-role-and-local-connection/40953)

<div class="topic-metadata">

**Author:** [@Spacerulerwill](https://forum.ansible.com/u/Spacerulerwill)\
**Replies:** 3\
**Last updated:** [March 12, 2025, 9:54am UTC](https://forum.ansible.com/t/how-to-get-ansible-to-use-virtual-environment-on-remote-side-with-a-role-and-local-connection/40953 "2025-03-12T09:54:28Z")

</div>

I am using a role which should in theory install psycopg2 into my python (3.12.9) virtual environment (among other things), but after running it is installed into my system python (3.9.21). I am installing ansible 11.3 v…

---

## [Ansible Builtin Modules not found using Python PlaybookExecutor](https://forum.ansible.com/t/ansible-builtin-modules-not-found-using-python-playbookexecutor/40709)

<div class="topic-metadata">

**Author:** [@Stephan4711](https://forum.ansible.com/u/Stephan4711)\
**Replies:** 13\
**Last updated:** [March 6, 2025, 11:39am UTC](https://forum.ansible.com/t/ansible-builtin-modules-not-found-using-python-playbookexecutor/40709 "2025-03-06T11:39:36Z")

</div>

hi, folks On a RHEL 9 system using Python 3.12, a private virtual environment and latest ansible-core (1.18) and the PlaybookExecutor API, I get errors if I call ansible.builtin modules full qualified in my playbook. E…

---

## [Proposal: introduce execution plugins](https://forum.ansible.com/t/proposal-introduce-execution-plugins/39973)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 10\
**Last updated:** [February 8, 2025, 3:50pm UTC](https://forum.ansible.com/t/proposal-introduce-execution-plugins/39973 "2025-02-08T15:50:59Z")

</div>

I’ve created a proposal on introducing execution plugins in ansible/proposals. I’d like to start this thread as a (secondary?) discussion place, maybe more on a philosophical level? I’ve been toying around with the idea…

---

## [Ansible.builtin.apt module does not work with installed Python 3.12 on target machine](https://forum.ansible.com/t/ansible-builtin-apt-module-does-not-work-with-installed-python-3-12-on-target-machine/39046)

<div class="topic-metadata">

**Author:** [@a531ac0edd70bcea93ad](https://forum.ansible.com/u/a531ac0edd70bcea93ad)\
**Replies:** 3\
**Last updated:** [December 13, 2024, 12:16pm UTC](https://forum.ansible.com/t/ansible-builtin-apt-module-does-not-work-with-installed-python-3-12-on-target-machine/39046 "2024-12-13T12:16:21Z")

</div>

I have an older Debian machine running Debian 10. This machine has installed Python 3.7.3. I cannot upgrade this machine to a newer version, need to wait for the company to release an upgrade. I upgraded my ansible inst…

---

## [SonarQube Deployment: "firewalld" Task Fails Due to Missing Python Library](https://forum.ansible.com/t/sonarqube-deployment-firewalld-task-fails-due-to-missing-python-library/11281)

<div class="topic-metadata">

**Author:** [@Roman\_Shymoliuk](https://forum.ansible.com/u/Roman_Shymoliuk)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 10:35pm UTC](https://forum.ansible.com/t/sonarqube-deployment-firewalld-task-fails-due-to-missing-python-library/11281 "2024-12-02T22:35:46Z")

</div>

Problem: When deploying SonarQube, the task to enable port 9000 fails with the following error: fatal: \[172.\*\*.\*.\*\*\*\]: FAILED! =\> {"changed": false, "msg": "Failed to import the required Python library (firewal) on ip-…

---

## [Real-time Capture and Display of Ansible Output Logs in HTML via Flask and Python](https://forum.ansible.com/t/real-time-capture-and-display-of-ansible-output-logs-in-html-via-flask-and-python/3378)

<div class="topic-metadata">

**Author:** [@Bart-Roels](https://forum.ansible.com/u/Bart-Roels)\
**Replies:** 1\
**Last updated:** [November 18, 2024, 10:16am UTC](https://forum.ansible.com/t/real-time-capture-and-display-of-ansible-output-logs-in-html-via-flask-and-python/3378 "2024-11-18T10:16:11Z")

</div>

I am currently experimenting with an Ansible playbook executed from a Flask application, and I’m aiming to capture the output logs in real-time, then send them to my HTML using Socket.IO. Despite attempting options like …

---

## [WinRM and Kerberos. WINRM CONNECTION ERROR: Bad HTTP response returned from server. Code 500](https://forum.ansible.com/t/winrm-and-kerberos-winrm-connection-error-bad-http-response-returned-from-server-code-500/10908)

<div class="topic-metadata">

**Author:** [@Iwan](https://forum.ansible.com/u/Iwan)\
**Replies:** 14\
**Last updated:** [November 15, 2024, 8:28am UTC](https://forum.ansible.com/t/winrm-and-kerberos-winrm-connection-error-bad-http-response-returned-from-server-code-500/10908 "2024-11-15T08:28:55Z")

</div>

A few months ago, I was able to set up an ansible environment in a Virtual environment on a Ubuntu 24.04 server. I use it mainly to manage Windows Servers through WinRM with a kerberos authentication. I communicate on …

---

## [Automated custom python deployment](https://forum.ansible.com/t/automated-custom-python-deployment/10528)

<div class="topic-metadata">

**Author:** [@Mykhailo\_Nesterenko](https://forum.ansible.com/u/Mykhailo_Nesterenko)\
**Replies:** 1\
**Last updated:** [October 28, 2024, 8:22am UTC](https://forum.ansible.com/t/automated-custom-python-deployment/10528 "2024-10-28T08:22:46Z")

</div>

I need to run ansible in target hosts with a custom python distribution. Currently I uploaded this python distribution manually and configured ansible\_python\_interpreter (Interpreter Discovery — Ansible Community Documen…

---

## [Ansible python interpreter](https://forum.ansible.com/t/ansible-python-interpreter/8500)

<div class="topic-metadata">

**Author:** [@Chandra\_Mukherjee](https://forum.ansible.com/u/Chandra_Mukherjee)\
**Replies:** 3\
**Last updated:** [September 18, 2024, 7:17am UTC](https://forum.ansible.com/t/ansible-python-interpreter/8500 "2024-09-18T07:17:09Z")

</div>

Hi All, I am trying to execute an ansible playbook using github actions but it is failing with the below error: “Failed to import the required Python library (psycopg2) on fv-az1811-354’s Python /opt/pipx/venvs/ansible…

---

## [Install ansible4.10.0 on custom python3.12.5 on redhat8](https://forum.ansible.com/t/install-ansible4-10-0-on-custom-python3-12-5-on-redhat8/8089)

<div class="topic-metadata">

**Author:** [@Okieh](https://forum.ansible.com/u/Okieh)\
**Replies:** 2\
**Last updated:** [August 26, 2024, 1:33pm UTC](https://forum.ansible.com/t/install-ansible4-10-0-on-custom-python3-12-5-on-redhat8/8089 "2024-08-26T13:33:28Z")

</div>

I did build a python3.12.5 underneath a custom location on a server without direct internet access. So i downloaded several modules and transferred them onto the server. But it complains about setuptools not being availa…

---

## [SSH issue to a Cisco 2960X on RHEL9 and Python 3.9](https://forum.ansible.com/t/ssh-issue-to-a-cisco-2960x-on-rhel9-and-python-3-9/7247)

<div class="topic-metadata">

**Author:** [@jdetwiler16](https://forum.ansible.com/u/jdetwiler16)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 4:05pm UTC](https://forum.ansible.com/t/ssh-issue-to-a-cisco-2960x-on-rhel9-and-python-3-9/7247 "2024-07-17T16:05:31Z")

</div>

Hi all! I just upgraded Python on a test agent server (RHEL9) to 3.9.18 and suddenly I’m getting the below error about encryption key mismatches between the agent and the switch (Cisco 2960X). The same exact playbook ru…

---

## [Unable to find any of pip3 to use. pip needs to be installed](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503)

<div class="topic-metadata">

**Author:** [@abhinanth\_k](https://forum.ansible.com/u/abhinanth_k)\
**Replies:** 6\
**Last updated:** [June 15, 2024, 2:16pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503 "2024-06-15T14:16:51Z")

</div>

Hi I am trying to use my community.mysql.mysql\_user and other mysql module am getting this error, Please help to fix this issue

---

## [Ansible-test: default container for ansible-test devel supports Python 3.13](https://forum.ansible.com/t/ansible-test-default-container-for-ansible-test-devel-supports-python-3-13/6368)

<div class="topic-metadata">

**Author:** [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Replies:** 0\
**Last updated:** [June 13, 2024, 7:42pm UTC](https://forum.ansible.com/t/ansible-test-default-container-for-ansible-test-devel-supports-python-3-13/6368 "2024-06-13T19:42:47Z")

</div>

ansible-test included in ansible-core devel now supports Python 3.13 in its default containers. It is by default used for sanity and unit tests, and can be used for integration tests as well with ansible-test integration…

---

## [Incorrect Package Names in AWX for python quay.io/ansible/awx-ee:latest](https://forum.ansible.com/t/incorrect-package-names-in-awx-for-python-quay-io-ansible-awx-ee-latest/6270)

<div class="topic-metadata">

**Author:** [@sbainfo\_srinivasan](https://forum.ansible.com/u/sbainfo_srinivasan)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 7:16am UTC](https://forum.ansible.com/t/incorrect-package-names-in-awx-for-python-quay-io-ansible-awx-ee-latest/6270 "2024-06-10T07:16:35Z")

</div>

Issue: I encountered an error while running the AWX image podman pull Quay. The error message indicates that the packages python38-cryptography, python38-pytz, python38-pyyaml, and python38-requests cannot be found. How…

---

## [Easy documentation for roles/collection](https://forum.ansible.com/t/easy-documentation-for-roles-collection/6043)

<div class="topic-metadata">

**Author:** [@lucian](https://forum.ansible.com/u/lucian)\
**Replies:** 5\
**Last updated:** [June 4, 2024, 11:08pm UTC](https://forum.ansible.com/t/easy-documentation-for-roles-collection/6043 "2024-06-04T23:08:50Z")

</div>

Hello everyone, I wanted to share with you docsible. It helps generate documentation for Ansible roles and collections automatically. Docsible creates clear, organized README files with mermaid graph, making it easier …

---

## [RecursionError: maximum recursion depth exceeded while getting the str of an object](https://forum.ansible.com/t/recursionerror-maximum-recursion-depth-exceeded-while-getting-the-str-of-an-object/6036)

<div class="topic-metadata">

**Author:** [@motorbass](https://forum.ansible.com/u/motorbass)\
**Replies:** 1\
**Last updated:** [May 28, 2024, 1:49pm UTC](https://forum.ansible.com/t/recursionerror-maximum-recursion-depth-exceeded-while-getting-the-str-of-an-object/6036 "2024-05-28T13:49:51Z")

</div>

Hi I’m currently building a network oriented project to configure SNMP + Radius on my Aruba switches. As aruba collection is pretty poor and not so well maintained, I’m able to do what I need using ansible.netcommon.cli…

---

## [Ansible-navigator run vs ansible-playbook](https://forum.ansible.com/t/ansible-navigator-run-vs-ansible-playbook/5914)

<div class="topic-metadata">

**Author:** [@hatz](https://forum.ansible.com/u/hatz)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 12:56am UTC](https://forum.ansible.com/t/ansible-navigator-run-vs-ansible-playbook/5914 "2024-05-23T00:56:30Z")

</div>

Hello, I am trying to learn about ansible and I was following the instructions provided in the documentation , but I am not understanding some behaviors. I built the environment image with ansible-builder build --tag po…

---

## [How to call ansible-playbook from custom python code](https://forum.ansible.com/t/how-to-call-ansible-playbook-from-custom-python-code/5665)

<div class="topic-metadata">

**Author:** [@mkyrc](https://forum.ansible.com/u/mkyrc)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 3:52am UTC](https://forum.ansible.com/t/how-to-call-ansible-playbook-from-custom-python-code/5665 "2024-05-16T03:52:38Z")

</div>

Hello all, I’d like to ask you about preferred method how to call playbook from custom python code. We have our own Python based orchestration tool where we can call (not only) ansible-playbooks (we are using direct sh…

---

## [Ansible-config line wrapping](https://forum.ansible.com/t/ansible-config-line-wrapping/4690)

<div class="topic-metadata">

**Author:** [@utoddl](https://forum.ansible.com/u/utoddl)\
**Replies:** 3\
**Last updated:** [April 3, 2024, 3:44pm UTC](https://forum.ansible.com/t/ansible-config-line-wrapping/4690 "2024-04-03T15:44:01Z")

</div>

When I run “ansible-config list”, something is taking the nice, long lines of text from ansible/config/base.yml and wrapping it at about 90 columns. I’ve been searching through python source files for longer than I care …

[Next page](https://forum.ansible.com/tag/python/316.md?match_all_tags=true&page=1&tags%5B%5D=python)
