Project

General

Profile

Actions

Feature #23453

closed

Ansible playbooks support a wider range of Ansible versions

Added by Brett Smith about 1 month ago. Updated 20 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
-

Description

source:tools/ansible/requirements.txt currently declares we need:

ansible-core ~= 2.16.14

And indeed, our Ansible code needs to continue working on Ansible 2.16, because that is the last version that supports Python 3.6 on managed nodes, and that's what RHEL 8 uses.

However, Ansible 2.16 does not support Python 3.13 on the control node. We want that for Debian 13 support. And Ubuntu 26.04 coming out soon will have Python 3.14.

The main requirement of this ticket is to update the requirement to support a range of Ansible versions. Ideally we would write:

ansible-core >= 2.16.0, < 2.21

and confirm that our playbooks work with the latest version on the right. We can use a smaller range if necessary. However:

  • The end of the range must allow the user to install at least one currently supported version in the ansible-core support matrix. As of this writing that's 2.18.
  • 2.18 is going to go out of support pretty soon, so supporting 2.19 would be a lot better. That version is much stricter about having boolean conditionals, so you might need to update some our playbook code to meet the new requirements. Ansible provides a porting guide for this. I don't think it's going to be too difficult, we're reasonably good about this already, but that is the main thing to look out for. If this becomes very hairy, please flag that at standup or in the ticket, and we can talk through our options.
  • Arvados developers must get the oldest version in order to build Docker images for the oldest distros. The easiest way to do that is to munge the requirements in arvados_ansible. In source:tools/ansible/roles/arvados_ansible/tasks/main.yml after "Upload requirements" add a task like:
    - name: Install minimum Ansible version for Arvados development
      # Add this variable to role defaults with default true
      when: "{{ arvados_ansible_minimum_version|bool }}" 
      ansible.builtin.replace:
        path: "{{ requirements_tempfile.path }}" 
        regexp: "^ansible-core\\s*>=" 
        replace: "ansible-core ~=" 
    

Test install-dev-tools.yml by installing on a fresh VM of your choice. Test install-arvados-cluster.yml by running test-provision-ansible on your branch.


Subtasks 1 (0 open1 closed)

Task #23455: Review 23453-ansible-version-rangeResolvedBrett Smith03/03/2026Actions

Related issues 1 (1 open0 closed)

Related to Arvados Epics - Idea #23170: Add support for Debian 13 (trixie)NewActions
Actions #1

Updated by Brett Smith about 1 month ago

  • Related to Idea #23170: Add support for Debian 13 (trixie) added
Actions #2

Updated by Brett Smith about 1 month ago

  • Target version set to Development 2026-03-04
  • Assigned To set to Stephen Smith
Actions #3

Updated by Brett Smith about 1 month ago

  • Description updated (diff)
Actions #4

Updated by Brett Smith about 1 month ago

  • Subtask #23455 added
Actions #5

Updated by Stephen Smith 27 days ago

  • Status changed from New to In Progress
Actions #6

Updated by Stephen Smith 21 days ago

Changes at arvados|acac04f1343c19d40bc426fcff813f9b530fcee8 branch 23453-ansible-version-range
Tests test-provision-ansible: #24

  • Changed the requirements to the specified range
    • Tested 2.19 and 2.20 with install-arvados-cluster
  • Added the task to use the minimum version for development
    • Tested with install-dev-tools and verified the minimum version was installed

I noticed some new deprecation warnings around INJECT_FACTS_AS_VARS, but the deadline for that seems to be in 2.24, and I couldn't figure out the correct syntax to fix it so I'm leaving that for later

I didn't see any warnings or errors about non-boolean conditionals so hopefully none were missed.

Actions #7

Updated by Brett Smith 21 days ago

Stephen Smith wrote in #note-6:

Changes at arvados|acac04f1343c19d40bc426fcff813f9b530fcee8 branch 23453-ansible-version-range

LGTM, thanks.

Actions #8

Updated by Stephen Smith 20 days ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF