From 3ac7d006852dc3e205e373d5f15fd927a65769ba Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Fri, 10 Jul 2026 14:10:35 +0800 Subject: [PATCH] fix: add ansible_python_interpreter variable to local tasks in automation playbooks --- apps/accounts/automations/change_secret/host/aix/main.yml | 4 ++++ apps/accounts/automations/change_secret/host/posix/main.yml | 4 ++++ apps/accounts/automations/push_account/host/aix/main.yml | 5 ++++- apps/accounts/automations/push_account/host/posix/main.yml | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/accounts/automations/change_secret/host/aix/main.yml b/apps/accounts/automations/change_secret/host/aix/main.yml index 625dd8826..2a79664c2 100644 --- a/apps/accounts/automations/change_secret/host/aix/main.yml +++ b/apps/accounts/automations/change_secret/host/aix/main.yml @@ -109,6 +109,8 @@ - check_conn_after_change or change_secret_result.failed | default(false) connection: local delegate_to: localhost + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" - name: "Verify {{ account.username }} SSH KEY (paramiko)" ssh_ping: @@ -123,3 +125,5 @@ - check_conn_after_change or change_secret_result.failed | default(false) connection: local delegate_to: localhost + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" diff --git a/apps/accounts/automations/change_secret/host/posix/main.yml b/apps/accounts/automations/change_secret/host/posix/main.yml index d860b8442..368e1004a 100644 --- a/apps/accounts/automations/change_secret/host/posix/main.yml +++ b/apps/accounts/automations/change_secret/host/posix/main.yml @@ -109,6 +109,8 @@ - check_conn_after_change or change_secret_result.failed | default(false) connection: local delegate_to: localhost + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" - name: "Verify {{ account.username }} SSH KEY (paramiko)" ssh_ping: @@ -123,3 +125,5 @@ - check_conn_after_change or change_secret_result.failed | default(false) connection: local delegate_to: localhost + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" diff --git a/apps/accounts/automations/push_account/host/aix/main.yml b/apps/accounts/automations/push_account/host/aix/main.yml index f9531fdec..e1697b24e 100644 --- a/apps/accounts/automations/push_account/host/aix/main.yml +++ b/apps/accounts/automations/push_account/host/aix/main.yml @@ -109,6 +109,8 @@ - check_conn_after_change or change_secret_result.failed | default(false) connection: local delegate_to: localhost + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" - name: "Verify {{ account.username }} SSH KEY (paramiko)" ssh_ping: @@ -123,4 +125,5 @@ - check_conn_after_change or change_secret_result.failed | default(false) delegate_to: localhost connection: local - + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" diff --git a/apps/accounts/automations/push_account/host/posix/main.yml b/apps/accounts/automations/push_account/host/posix/main.yml index 4160ed4c1..33db96ab3 100644 --- a/apps/accounts/automations/push_account/host/posix/main.yml +++ b/apps/accounts/automations/push_account/host/posix/main.yml @@ -109,6 +109,8 @@ - check_conn_after_change or change_secret_result.failed | default(false) delegate_to: localhost connection: local + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}" - name: "Verify {{ account.username }} SSH KEY (paramiko)" ssh_ping: @@ -123,4 +125,5 @@ - check_conn_after_change or change_secret_result.failed | default(false) delegate_to: localhost connection: local - + vars: + ansible_python_interpreter: "{{ local_python_interpreter }}"