Ansible News - Ansible Core 2.16.0 General Available “All My Love”
The Release Summary of Ansible Core 2.16.0 on November 6, 2023
Ansible, the open-source automation platform, has released a new version with numerous enhancements, bug fixes, and security updates. Ansible has become a fundamental tool for managing IT infrastructure and applications, streamlining workflows, and maintaining infrastructure as code (IaC) principles.
Let’s delve into the key changes introduced in this release:
- Drop Python 3.5 support for module execution.
- Drop Python 3.9 support for the controller.
- Add Python 3.12 support.
- Preserve display context when proxying display over the queue.
TaskExecutorto not unnecessarily establish persistent
ansible-connectionwhen not needed.
Collection Path The INI config option “collections_paths” has been deprecated; please use the singular form “collections_path” instead. Additionally, the environment variable “ANSIBLE_COLLECTIONS_PATHS” is now deprecated, and you should use the singular form “ANSIBLE_COLLECTIONS_PATH” instead.
Removed Support for Windows Server 2012 and 2012 R2 as Microsoft’s support end of life on October 10th, 2023.
Remote Support New remotes have been added, including Alpine 3.18, Fedora 38, Fedora 38 container, FreeBSD 13.2 remote, RHEL 8.8 remotes, and RHEL 9.2 remotes, expanding compatibility across various platforms.
Python 3.12 Support Support for testing with Python 3.12 has been introduced, keeping Ansible up-to-date with the latest Python version.
Improved Container Naming Containers created by ansible-test now include the current test session ID in their name, avoiding conflicts between concurrent ansible-test invocations.
Improved Test Provisioning RHEL 8.8 and RHEL 9.2 provisioning can now be used with the
--python 3.11option, improving testing flexibility.
Streamlined Code Coverage Thread code coverage has been enabled alongside existing multiprocessing coverage, enhancing code quality assurance.
RHEL 8.8 and RHEL 9.2 Support Provisioning for RHEL 8.8 and RHEL 9.2 has been added, expanding compatibility for Red Hat Enterprise Linux users.
Deprecated Features Removal Several deprecated features have been removed, including the ‘smart’ connection option, deprecated INI config options, and support for older Windows Server versions.
The Best Resources For Ansible
- CYBER DEALS at The Linux Foundation! Up to 65% off, and a FREE GIFT with EVERY PURCHASE! Limited Time, Don't Delay!
- Udemy: Learn Ansible Automation in 250+examples & practical lessons: Learn Ansible with some real-life examples of how to use the most common modules and Ansible Playbook
- Ansible by Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
- Ansible Cookbook: A Comprehensive Guide to Unleashing the Power of Ansible via Best Practices, Troubleshooting, and Linting Rules with Luca Berton
- Ansible For Windows By Examples: 50+ Automation Examples For Windows System Administrator And DevOps
- Ansible For Linux by Examples: 100+ Automation Examples For Linux System Administrator and DevOps
- Ansible Linux Filesystem By Examples: 40+ Automation Examples on Linux File and Directory Operation for Modern IT Infrastructure
- Ansible For Security by Examples: 100+ Automation Examples to Automate Security and Verify Compliance for IT Modern Infrastructure
- Ansible Tips and Tricks: 10+ Ansible Examples to Save Time and Automate More Tasks
- Ansible Linux Users & Groups By Examples: 20+ Automation Examples on Linux Users and Groups Operation for Modern IT Infrastructure
- Ansible For PostgreSQL by Examples: 10+ Examples To Automate Your PostgreSQL database
- Ansible For Amazon Web Services AWS By Examples: 10+ Examples To Automate Your AWS Modern Infrastructure
- Ansible Automation Platform By Example: A step-by-step guide for the most common user scenarios
Improved CLI Argument Parsing Support for automatically prepending with the help of CLI arguments that support being specified multiple times has been added, streamlining the command-line interface.
DEFAULT_TRANSPORTnow defaults to ‘ssh,’ while the ‘smart’ option is deprecated due to the decreasing relevance of control persist in newer OpenSSH versions.
Python Type Hints One notable update is the addition of Python-type hints to the
Displayclass, contributing to improved code readability and maintainability.
Galaxy Collection Warning To enhance user control, a new option,
GALAXY_COLLECTIONS_PATH_WARNING, allows disabling warnings in the ansible-galaxy collection install process when installing a collection to an unconfigured path.
Default Python Interpreter Python 3.12 has been added to the default
INTERPRETER_PYTHON_FALLBACKlist, ensuring compatibility with the latest Python release.
utcnowhave been included in
ansible.module_utils.compat.datetimeto return fixed offset datetime objects, aiding in time management and conversions.
Distribution Server Timeout A general
GALAXY_SERVER_TIMEOUTconfiguration option has been introduced for distribution servers, making it easier to manage distribution server timeouts effectively.
Python Type Annotations Python type annotations have been added to connection plugins, offering better code insights and helping developers write more reliable code.
Set Filters Clarification The documentation for set filters, including
union, now explicitly states that the returned list items are in arbitrary order, offering clarity to users.
CleansingNodeVisitor Removal The
CleansingNodeVisitorclass and its usage have been removed due to templating changes that rendered it unnecessary, simplifying code and improving maintainability.
Manifest File Changes Several commands, such as
recursive-excludefor generated files, have been removed from the
MANIFEST.infile, as they were found to be unnecessary. This streamlines the release process.
Man Pages Generation The ansible-core sdist no longer contains pre-generated man pages. Instead, a script for generating man pages and standalone RST documentation is included in the sdist.
Directory Relocation The
examplesdirectories have been relocated to the Ansible Documentation repository, making documentation management more organized.
Setuptools Version Requirement The minimum required setuptools version has been updated to 66.1.0, ensuring compatibility with Python 3.12.
Updates for Specific Platforms
SMGL OS Family The
ansible_service_mgrfact has been updated to include the init system for the SMGL OS family.
Importlib Enhancements Where possible,
importlib.resources.abc.TraversableResourcesis now used instead of the deprecated
Package Data in setup.cfg To avoid setuptools warnings, the
package_dataoption is now used instead of
GPG Check Enhancement The GPG check, provided internally by the
transaction.runmethod, is now used instead of manual calling, improving the integrity of the process.
- Dict Constructor The dict constructor is no longer added to globals in Templar, as all required Jinja2 versions already include it.
Collection and Metadata Filtering The
ansible-doccommand now allows filtering the listing of collections and metadata dump by more than one collection, improving search and retrieval capabilities.
Error Handling Improved error messages are provided for collection dependency resolution when pre-releases are not specified, enhancing the user experience.
File Extraction Warning A warning is now issued when extracting files from a role that contains illegal characters in file names, allowing users to address the issue proactively.
- Symlink Prevention Ansible-galaxy now prevents roles from using symlinks to overwrite files outside of the installation directory, enhancing security (CVE-2023–5115).
Bug Fixes and Improvements
A range of bug fixes, enhancements, and improvements have been made, addressing issues related to handler notifications, symbolic modes, parsing multi-line Jinja2 blocks, module responses, and more. These updates contribute to a more stable and reliable Ansible experience.
While this release comes with numerous enhancements and fixes, there are a few known issues, such as difficulties with installing roles containing Java inner classes and limitations in detecting f-string spacing issues with the pep8 sanity test on specific Python versions.
Full Release Note
For a complete list of changes, consult the Ansible documentation and release notes for a comprehensive overview of what’s new and improved:
In conclusion, this Ansible 2.16.0 release represents a significant step forward in enhancing automation capabilities, improving documentation, and addressing security and usability concerns. Users are encouraged to update to the latest version to benefit from these enhancements and bug fixes.Subscribe to the YouTube channel, Medium, Website, Twitter, and Substack to not miss the next episode of the Ansible Pilot.
Learn the Ansible automation technology with some real-life examples in my
My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
Want to keep this project going? Please donate