From e82d9564f0592e1ca48403d9b4d2cee7871ef4f2 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 25 Feb 2026 19:36:55 -0800 Subject: [PATCH] Fix libxcrypt test setup on macOS 26.3 (#86598) --- test/integration/targets/setup_libxcrypt/tasks/main.yml | 3 +++ test/integration/targets/setup_libxcrypt/tasks/uninstall.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/test/integration/targets/setup_libxcrypt/tasks/main.yml b/test/integration/targets/setup_libxcrypt/tasks/main.yml index 40f488dcee7..0b193703a8f 100644 --- a/test/integration/targets/setup_libxcrypt/tasks/main.yml +++ b/test/integration/targets/setup_libxcrypt/tasks/main.yml @@ -35,5 +35,8 @@ notify: libxcrypt was installed become: yes become_user: "{{ brew_stat.stat.pw_name }}" + vars: + # Avoid using the current interpreter, which may be from a venv that the become user has no access to. + ansible_python_interpreter: "{{ lookup('env', 'ANSIBLE_TEST_PYTHON_INTERPRETER') }}" environment: HOMEBREW_NO_AUTO_UPDATE: True diff --git a/test/integration/targets/setup_libxcrypt/tasks/uninstall.yml b/test/integration/targets/setup_libxcrypt/tasks/uninstall.yml index 8f73d56dc6a..09817e7e201 100644 --- a/test/integration/targets/setup_libxcrypt/tasks/uninstall.yml +++ b/test/integration/targets/setup_libxcrypt/tasks/uninstall.yml @@ -32,5 +32,8 @@ command: brew uninstall libxcrypt become: yes become_user: "{{ brew_stat.stat.pw_name }}" + vars: + # Avoid using the current interpreter, which may be from a venv that the become user has no access to. + ansible_python_interpreter: "{{ lookup('env', 'ANSIBLE_TEST_PYTHON_INTERPRETER') }}" environment: HOMEBREW_NO_AUTO_UPDATE: True