Skip to main content

Ansible 2.21.1

Release Date: June 18, 2026

Red Hat has released ansible-core 2.21.1 on June 18, 2026, as a maintenance update to the 2.21 series. This patch release addresses several bugs discovered since the 2.21.0 feature release on May 18, 2026, and is recommended for all users of the 2.21 line.

Overview of ansible-core 2.21

Ansible-core 2.21 was a feature release that introduced several notable changes to Ansible's automation runtime. The 2.21.1 patch refines these changes and resolves regressions reported by the community.

Key Changes in 2.21.0 (Feature Release)

  • load_vars support for community.sops — Ansible-core 2.21 is the first version to support the load_vars action plugin from the community.sops collection, enabling encrypted variable files to be decrypted at load time using Mozilla SOPS.
  • Invocation key removal — Python and PowerShell modules no longer include the invocation task result key by default. This change reduces result payload size significantly. The key can be re-enabled via the INJECT_FACTS_AS_VARS configuration, but this option is now deprecated and will default to False in ansible-core 2.24.
  • Deprecation: INJECT_FACTS_AS_VARS — The configuration that controls whether facts are injected as individual variables (as opposed to accessed via the ansible_facts namespace) is now deprecated. Users relying on injected facts should migrate to ansible_facts['fact_name'] syntax.

What's Fixed in 2.21.1

  • Performance regression — A slowdown in playbook parsing when using large inventory files with extensive host_vars has been resolved. Users who upgraded to 2.21.0 and noticed longer startup times should see a return to normal parsing speeds.
  • Connection plugin timeout — The ansible.builtin.ssh connection plugin now correctly respects the timeout setting when establishing connections to Windows hosts via OpenSSH.
  • async task cleanup — A race condition in async job polling that could leave zombie processes on the control node has been fixed.
  • Jinja2 template error handling — Improved error messages when template rendering fails, making debugging playbooks easier.
  • Collection signature verification — Fixed a bug where signature verification for signed collections could fail with certain GPG key configurations.

Upgrade Considerations

Before upgrading, review the ansible-core 2.21 Porting Guide for the complete list of behavioral changes. The most impactful change is the invocation key removal — if your playbooks or downstream tooling parse task results by accessing the invocation key, you'll need to update your code or set INJECT_FACTS_AS_VARS: true in ansible.cfg.

Ansible-core 2.21.1 is available via PyPI (pip install ansible-core==2.21.1) and through all major Linux distribution repositories. The corresponding Ansible community package 14.1.0, which bundles ansible-core 2.21.1 with the latest curated collection set, was also released on June 18, 2026.

What is New?

By continuing to use the site, you agree to the use of cookies.