ansible/ansible
By the numbers
Data collected on 2026-04-30 from the devel branch at commit ff6b7e404a.
Size
The tree is overwhelmingly Python, with small but important pieces of PowerShell and C# for Windows targets, and a large body of YAML used for configuration, integration-test fixtures, and changelog fragments.
xychart-beta horizontal
title "Source files by language (lib/ + test/)"
x-axis ["Python (lib)", "Python (test)", "YAML", "PowerShell", "C#"]
y-axis "Files" 0 --> 2200
bar [583, 1213, 2042, 24, 6]| Layer | Size |
|---|---|
lib/ (controller code, modules, plugins, module_utils) |
8.2 MB across 583 Python files |
test/ (unit + integration + ansible-test tooling) |
25 MB across 1213 Python files |
Total Python lines under lib/ |
~136,000 |
YAML files (excluding .git/) |
2,042 |
PowerShell files (.ps1 + .psm1) |
24 |
| C# files | 6 |
Largest source files
The biggest single files are concentrated in the controller hot path and a few sprawling modules.
| File | Lines |
|---|---|
lib/ansible/modules/user.py |
3,564 |
lib/ansible/module_utils/basic.py |
2,219 |
lib/ansible/galaxy/collection/__init__.py |
1,933 |
lib/ansible/plugins/loader.py |
1,905 |
lib/ansible/cli/galaxy.py |
1,889 |
lib/ansible/executor/module_common.py |
1,694 |
lib/ansible/cli/doc.py |
1,676 |
lib/ansible/module_utils/urls.py |
1,639 |
lib/ansible/plugins/connection/ssh.py |
1,625 |
lib/ansible/_internal/_templating/_jinja_bits.py |
1,500+ |
Several of these are surfaced again in Cleanup opportunities → Complexity hotspots (when present) — they are natural targets for further decomposition.
Activity
| Metric | Value |
|---|---|
| Total commits in the repo | ~55,400 |
| Commits in the last 90 days | ~119 |
| First commit | 2012-02-23 ("Genesis." by Michael DeHaan) |
Most recent commit on devel |
2026-04-30 |
| Unique authors (over project lifetime) | 6,433 |
The recent-90-day churn is concentrated in a small set of files, suggesting where current development effort is going.
| Source path | Commits in last 90 days |
|---|---|
lib/ansible/config/base.yml |
8 |
lib/ansible/modules/user.py |
7 |
lib/ansible/plugins/action/__init__.py |
6 |
lib/ansible/plugins/connection/psrp.py |
4 |
lib/ansible/module_utils/urls.py |
4 |
lib/ansible/module_utils/csharp/Ansible.Basic.cs |
4 |
lib/ansible/plugins/connection/winrm.py |
3 |
lib/ansible/plugins/connection/ssh.py |
3 |
lib/ansible/modules/find.py |
3 |
lib/ansible/modules/apt.py |
3 |
lib/ansible/galaxy/collection/concrete_artifact_manager.py |
3 |
lib/ansible/galaxy/collection/__init__.py |
3 |
lib/ansible/executor/task_executor.py |
3 |
lib/ansible/executor/module_common.py |
3 |
lib/ansible/_internal/_powershell/_clixml.py |
3 |
The hot files are mostly the connection layer (PowerShell remoting, SSH), the URL utilities, the user module, and the action plugin base — areas with active platform support and bug-fixing.
Bot-attributed commits
Searching the git log on devel:
- Commits whose author/committer email ends in
[bot]: 0 Co-authored-by:trailers naming a bot: 1
ansible-core is a long-standing project with a strong human-authorship culture; the README explicitly states "This project is substantially coded by humans." Bot-attributed work is essentially absent. Note that this is a lower bound on AI-assisted contribution since inline tooling like Copilot does not leave git-history traces.
Test-to-code ratio
Counting Python files only:
lib/: 583 filestest/: 1,213 files
A 2.08-to-1 test-to-source ratio. Integration-test targets under test/integration/targets/ make up most of test/ by volume and contain hundreds of YAML playbooks alongside the Python.
Plugin and module counts
| Category | Count |
|---|---|
Plugin types under lib/ansible/plugins/ |
17 (action, become, cache, callback, cliconf, connection, doc_fragments, filter, httpapi, inventory, lookup, netconf, shell, strategy, terminal, test, vars) |
Built-in modules under lib/ansible/modules/ |
73 |
End-user CLIs (excluding ansible-test) |
9 (ansible, ansible-config, ansible-console, ansible-doc, ansible-galaxy, ansible-inventory, ansible-playbook, ansible-pull, ansible-vault) |
| Connection plugins | 4 (local, ssh, winrm, psrp) |
| Become plugins | 3 (sudo, su, runas) |
| Strategy plugins | 4 (linear, free, host_pinned, debug) |
| Inventory plugins | 9 (advanced_host_list, auto, constructed, generator, host_list, ini, script, toml, yaml) |
| Callback plugins | 5 (default, minimal, oneline, junit, tree) |
Releases
The first tagged Ansible 2.x release with a fully-public commit history is v2.5.0 in March 2018. Major minor versions since then:
| Tag | Date |
|---|---|
| v2.5.0 | 2018-03-22 |
| v2.6.0 | 2018-06-28 |
| v2.7.0 | 2018-10-03 |
| v2.8.0 | 2019-05-16 |
| v2.9.0 | 2019-10-31 |
| v2.10.0 | 2020-08-13 |
| v2.11.0 | 2021-04-26 |
| v2.12.0 | 2021-11-08 |
| v2.13.0 | 2022-05-16 |
| v2.14.0 | 2022-11-07 |
| v2.15.0 | 2023-05-15 |
| v2.16.0 | 2023-11-06 |
| v2.17.0 | 2024-05-20 |
| v2.18.0 | 2024-11-04 |
| v2.19.0 | 2025-07-21 |
| v2.20.0 | 2025-11-04 |
Release cadence settled into approximately twice a year (May and November) starting with the 2.13 line. The current devel branch identifies as 2.22.0.dev0 per lib/ansible/release.py.
Complexity
A handful of "god files" carry an outsized share of the controller's complexity:
| File | Lines | Notes |
|---|---|---|
lib/ansible/module_utils/basic.py |
2,219 | The remote-side AnsibleModule class: argument parsing, run-time, file/permissions helpers, no-log scrubbing |
lib/ansible/plugins/loader.py |
1,905 | Generic plugin loader, collection name redirects, deprecation handling |
lib/ansible/executor/module_common.py |
1,694 | AnsiBallZ assembly: AST scanning of imports, dependency walk, archive build |
lib/ansible/_internal/_task.py |
1,444 | Internal task representation used across the worker boundary |
lib/ansible/_internal/_wrapt.py |
1,015 | Vendored wrapt proxy primitives — large but stable |
lib/ansible/plugins/connection/ssh.py |
1,625 | The default connection: ssh + sftp + scp + sshpass + reverse-tunnels + ControlMaster |
All controller code uses from __future__ import annotations, so type hints are strings at runtime. The line limit is 160 (not 80) per AGENTS.md.
Languages and platforms
ansible-core is Python-first and POSIX-only on the controller, but supports Windows targets through:
- PowerShell modules (
lib/ansible/modules/setup.ps1is symlinked or generated at build time; most Windows modules live in collections likeansible.windows). - The
winrmandpsrpconnection plugins. - Compiled-on-the-fly C# helpers under
lib/ansible/module_utils/csharp/.
TODO/FIXME backlog
A literal grep for TODO|FIXME|XXX|HACK across lib/ansible/ matches roughly 359 occurrences. This is a rough proxy for accumulated technical debt; the bulk live in module_utils/basic.py, plugins/loader.py, and the older module_utils files that handle distro-specific quirks.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.