What Is New in Ansible 8
Ansible 8 delivers a focused set of enhancements, primarily targeting core stability and the transition to newer Python runtimes. This release streamlines the codebase and prepares the ecosystem for future development.
| Category | Summary |
|---|---|
| New Features | Added a new ansible-pip script for managing collections in virtual environments. |
| Major Changes | Dropped support for Python 3.8. The minimal supported version is now Python 3.9. |
| Deprecations | Removed previously deprecated features, including the ansible-test --tox option and the ansible-connection plugin family. |
| Bug Fixes | Numerous fixes across the codebase, including resolving issues with collection loading and inventory parsing. |
| Packaging | The ansible-core package now includes the ansible-pip tool and has updated its dependency on resolvelib. |
Why did Ansible drop Python 3.8 support?
The core team removed support for Python 3.8 to align with the language's own end-of-life schedule and to utilize newer features available in Python 3.9+. This is a standard maintenance procedure to keep the codebase modern and maintainable.
In practice, this means you must upgrade your control node to at least Python 3.9 before installing Ansible 8. This change reduces the testing matrix for developers and allows for cleaner code.
What is the new ansible-pip tool for?
The new ansible-pip script is designed for managing Python dependencies within Ansible collection virtual environments. It simplifies the process of installing and managing pip packages that are specific to a collection's needs.
This tool addresses the common pain point of isolating collection-specific dependencies from the system-wide Python environment, preventing conflicts and ensuring consistent execution environments for your automation.
What deprecated features were finally removed?
This release cleans out several deprecated items that were scheduled for removal. The ansible-test --tox option is gone, as its functionality has been replaced. The entire ansible-connection plugin family has also been excised from the codebase.
If you were still relying on these features, your playbooks or testing routines will break. This cleanup is essential for reducing technical debt and streamlining the project's architecture for future development.
FAQ
Is Ansible 8 a major breaking change?
Yes, primarily due to the mandatory upgrade from Python 3.8 to 3.9. If your control node is already on Python 3.9 or later, the upgrade path is much smoother. Always test in a pre-production environment first.
How do I install collections that need special pip packages now?
Use the new ansible-pip tool. It's included in the ansible-core package and is the intended method for handling collection-specific Python dependencies inside their virtual environments.
My custom plugin used ansible-connection, what should I do?
You need to refactor it. The ansible-connection plugin system was deprecated and has now been completely removed. Consult the latest Ansible documentation for the current recommended methods for developing connection plugins.
Why was the --tox option removed from ansible-test?
The --tox option was made redundant by internal improvements to the ansible-test tooling. The current testing infrastructure provides a more robust and maintainable way to handle multi-environment testing without relying on tox.
Where can I find the full list of changes?
The definitive source is the Ansible 8 Changelog on GitHub. It contains a detailed, commit-by-commit accounting of every change in this release.