Ansible-core 2.21 Porting Guide
This section discusses the behavioral changes between ansible-core 2.20 and ansible-core 2.21.
It is intended to assist in updating your playbooks, plugins, and other parts of your Ansible infrastructure so they will work with this version of Ansible.
Review this page and the ansible-core Changelog for 2.21 to understand necessary changes.
This document is part of a collection on porting. The complete list of porting guides can be found at porting guides.
Introduction
No notable changes
Playbook
No notable changes
Engine
utils.encrypt functions moved to depend on libcrypt/libxcrypt as the previous passlib has been deprecated, this creates compatible password hashes, but they will not be exactly the same as passlib did extra process and formatting. Any code that uses these functions should still transparently work, but their output will not match previous versions of Ansible.
Plugin API
Command Line
No notable changes
Deprecated
Failure inference from non-zero rc
Failure inference for modules and actions that return a non-zero rc value and no failed value is deprecated.
Modules and actions may use any logic desired to determine failure (including consulting rc), but failures must be explicitly communicated in the task result by setting failed true, or via methods that do so implicitly, such as fail_json or raising an unhandled error.
Runtime deprecation warnings will be issued in release 2.22 when a deprecated failure inference occurs.
When failure inference is removed in future releases, the rc key will receive no special attention during task result processing.
Modules
Modules removed
The following modules no longer exist:
No notable changes
Deprecation notices
No notable changes
Noteworthy module changes
No notable changes
Plugins
Noteworthy plugin changes
password_hash filter - No changes to the filter itself, but it depends on the utils.encrypt code, which moved from passlib (deprecated) to libcrypt/libxcrypt, this still creates valid hashes, but they are not exactly the same as the previous ones with the same input.
Porting custom scripts
No notable changes
Networking
No notable changes